@splitsoftware/splitio-browserjs 1.0.0-rc.0 → 1.0.0-rc.2
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 -1
- package/cjs/index.js +1 -3
- package/cjs/platform/getModules.js +2 -1
- package/cjs/settings/defaults.js +1 -1
- package/cjs/settings/index.js +0 -6
- package/cjs/splitFactory.js +5 -6
- package/esm/index.js +0 -1
- package/esm/platform/getModules.js +2 -1
- package/esm/settings/defaults.js +1 -1
- package/esm/settings/index.js +0 -6
- package/esm/splitFactory.js +4 -5
- package/package.json +6 -9
- package/src/index.ts +0 -1
- package/src/platform/getModules.ts +3 -3
- package/src/settings/defaults.ts +4 -4
- package/src/settings/index.ts +0 -6
- package/src/splitFactory.ts +6 -7
- package/types/index.d.ts +6 -16
- package/cjs/full/index.js +0 -17
- package/cjs/full/splitFactory.js +0 -28
- package/cjs/platform/getFetchFull.js +0 -9
- package/cjs/settings/full.js +0 -30
- package/esm/full/index.js +0 -7
- package/esm/full/splitFactory.js +0 -24
- package/esm/platform/getFetchFull.js +0 -4
- package/esm/settings/full.js +0 -26
- package/full/package.json +0 -6
- package/src/full/index.ts +0 -7
- package/src/full/splitFactory.ts +0 -27
- package/src/platform/getFetchFull.ts +0 -6
- package/src/settings/full.ts +0 -29
- package/types/full/index.d.ts +0 -62
- package/types/splitio.d.ts +0 -1586
- /package/cjs/platform/{getFetchSlim.js → getFetch.js} +0 -0
- /package/cjs/{full/umd.js → umd-full.js} +0 -0
- /package/esm/platform/{getFetchSlim.js → getFetch.js} +0 -0
- /package/esm/{full/umd.js → umd-full.js} +0 -0
- /package/src/platform/{getFetchSlim.ts → getFetch.ts} +0 -0
- /package/src/{full/umd.ts → umd-full.ts} +0 -0
package/src/settings/full.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { settingsValidation } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/index';
|
|
2
|
-
import { defaults } from './defaults';
|
|
3
|
-
import { validateRuntime } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/runtime';
|
|
4
|
-
import { validateStorageCS } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/storage/storageCS';
|
|
5
|
-
import { validatePluggableIntegrations } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/integrations/pluggable';
|
|
6
|
-
import { validateLogger } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/logger/pluggableLogger';
|
|
7
|
-
import { validateLocalhostWithDefault } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/localhost/builtin';
|
|
8
|
-
import { validateConsent } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/consent';
|
|
9
|
-
import { STANDALONE_MODE } from '@splitsoftware/splitio-commons/src/utils/constants';
|
|
10
|
-
|
|
11
|
-
const params = {
|
|
12
|
-
defaults,
|
|
13
|
-
acceptKey: true, // Client with bound key
|
|
14
|
-
runtime: validateRuntime,
|
|
15
|
-
storage: validateStorageCS,
|
|
16
|
-
integrations: validatePluggableIntegrations,
|
|
17
|
-
logger: validateLogger,
|
|
18
|
-
localhost: validateLocalhostWithDefault, // Full SplitFactory provides a default localhost module, except a valid one is provided
|
|
19
|
-
consent: validateConsent,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export function settingsFactory(config: any) {
|
|
23
|
-
const settings = settingsValidation(config, params);
|
|
24
|
-
|
|
25
|
-
// @ts-ignore, Override in localhost and consumer modes to emit SDK_READY event
|
|
26
|
-
if (settings.mode !== STANDALONE_MODE) settings.sync.largeSegmentsEnabled = false;
|
|
27
|
-
|
|
28
|
-
return settings;
|
|
29
|
-
}
|
package/types/full/index.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Declaration file for JavaScript Browser Split Software SDK
|
|
2
|
-
// Project: http://www.split.io/
|
|
3
|
-
// Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
|
|
4
|
-
|
|
5
|
-
/// <reference path="../splitio.d.ts" />
|
|
6
|
-
export = JsSdk;
|
|
7
|
-
|
|
8
|
-
declare module JsSdk {
|
|
9
|
-
/**
|
|
10
|
-
* Full version of the Split.io SDK factory function.
|
|
11
|
-
*
|
|
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
|
-
*
|
|
15
|
-
* The settings parameter should be an object that complies with the SplitIO.IBrowserSettings.
|
|
16
|
-
* For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
|
|
17
|
-
*/
|
|
18
|
-
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.ISDK;
|
|
19
|
-
export function SplitFactory(settings: SplitIO.IBrowserAsyncSettings): SplitIO.IAsyncSDK;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Persistent storage based on the LocalStorage Web API for browsers.
|
|
23
|
-
*
|
|
24
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#storage}
|
|
25
|
-
*/
|
|
26
|
-
export function InLocalStorage(options?: SplitIO.InLocalStorageOptions): SplitIO.StorageSyncFactory;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Pluggable storage to use the SDK in consumer mode.
|
|
30
|
-
*
|
|
31
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#sharing-state-with-a-pluggable-storage}
|
|
32
|
-
*/
|
|
33
|
-
export function PluggableStorage(options: SplitIO.PluggableStorageOptions): SplitIO.StorageAsyncFactory;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Creates a logger instance that enables descriptive log messages with DEBUG log level when passed in the factory settings.
|
|
37
|
-
*
|
|
38
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
39
|
-
*/
|
|
40
|
-
export function DebugLogger(): SplitIO.ILogger;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Creates a logger instance that enables descriptive log messages with INFO log level when passed in the factory settings.
|
|
44
|
-
*
|
|
45
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
46
|
-
*/
|
|
47
|
-
export function InfoLogger(): SplitIO.ILogger;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Creates a logger instance that enables descriptive log messages with WARN 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 WarnLogger(): SplitIO.ILogger;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Creates a logger instance that enables descriptive log messages with ERROR 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 ErrorLogger(): SplitIO.ILogger;
|
|
62
|
-
}
|