@splitsoftware/splitio-browserjs 0.10.2-rc.0 → 0.10.2-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 +3 -2
- package/cjs/settings/defaults.js +1 -1
- package/esm/settings/defaults.js +1 -1
- package/package.json +4 -7
- package/src/settings/defaults.ts +1 -1
- package/types/splitio.d.ts +147 -61
- package/cjs/suite/browserSuite.js +0 -70
- package/cjs/suite/index.js +0 -15
- package/esm/suite/browserSuite.js +0 -66
- package/esm/suite/index.js +0 -6
- package/src/suite/browserSuite.ts +0 -80
- package/src/suite/index.ts +0 -6
- package/suite/package.json +0 -5
- package/types/suite/index.d.ts +0 -50
package/CHANGES.txt
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
0.10.2 (October
|
|
2
|
-
- Added
|
|
1
|
+
0.10.2 (October XX, 2023)
|
|
2
|
+
- Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
|
|
3
|
+
- Updated @splitsoftware/splitio-commons package to version 1.10.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
|
|
3
4
|
|
|
4
5
|
0.10.1 (September 22, 2023)
|
|
5
6
|
- Updated @splitsoftware/splitio-commons package to version 1.9.1. This update removes the handler for 'unload' DOM events, that can prevent browsers from being able to put pages in the back/forward cache for faster back and forward loads (Related to issue https://github.com/splitio/javascript-client/issues/759).
|
package/cjs/settings/defaults.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.defaults = void 0;
|
|
4
4
|
var index_1 = require("@splitsoftware/splitio-commons/cjs/logger/index");
|
|
5
5
|
var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
|
|
6
|
-
var packageVersion = '0.10.2-rc.
|
|
6
|
+
var packageVersion = '0.10.2-rc.2';
|
|
7
7
|
/**
|
|
8
8
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
|
9
9
|
* Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
|
package/esm/settings/defaults.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index';
|
|
2
2
|
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/esm/utils/constants';
|
|
3
|
-
var packageVersion = '0.10.2-rc.
|
|
3
|
+
var packageVersion = '0.10.2-rc.2';
|
|
4
4
|
/**
|
|
5
5
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
|
6
6
|
* Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitsoftware/splitio-browserjs",
|
|
3
|
-
"version": "0.10.2-rc.
|
|
3
|
+
"version": "0.10.2-rc.2",
|
|
4
4
|
"description": "Split SDK for JavaScript on Browser",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"src",
|
|
16
16
|
"types",
|
|
17
17
|
"full",
|
|
18
|
-
"scripts/ga-to-split-autorequire.js"
|
|
19
|
-
"suite"
|
|
18
|
+
"scripts/ga-to-split-autorequire.js"
|
|
20
19
|
],
|
|
21
20
|
"scripts": {
|
|
22
21
|
"check": "npm run check:lint && npm run check:types && npm run check:version",
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js",
|
|
32
31
|
"test": "npm run test:unit && npm run test:e2e",
|
|
33
32
|
"test:unit": "jest",
|
|
34
|
-
"test:e2e": "npm run test:e2e-logger && npm run test:e2e-offline && npm run test:e2e-online && npm run test:e2e-destroy && npm run test:e2e-errorCatching && npm run test:e2e-push && npm run test:e2e-
|
|
33
|
+
"test:e2e": "npm run test:e2e-logger && npm run test:e2e-offline && npm run test:e2e-online && npm run test:e2e-destroy && npm run test:e2e-errorCatching && npm run test:e2e-push && npm run test:e2e-consumer",
|
|
35
34
|
"test:e2e-logger": "karma start karma/e2e.logger.karma.conf.js",
|
|
36
35
|
"test:e2e-offline": "karma start karma/e2e.offline.karma.conf.js",
|
|
37
36
|
"test:e2e-online": "karma start karma/e2e.online.karma.conf.js",
|
|
@@ -40,7 +39,6 @@
|
|
|
40
39
|
"test:e2e-push": "karma start karma/e2e.push.karma.conf.js",
|
|
41
40
|
"test:e2e-gaIntegration": "karma start karma/e2e.gaIntegration.karma.conf.js",
|
|
42
41
|
"test:e2e-consumer": "karma start karma/e2e.consumer.karma.conf.js",
|
|
43
|
-
"test:e2e-suite": "karma start karma/e2e.suite.karma.conf.js",
|
|
44
42
|
"pretest-ts-decls": "npm run build:esm && npm run build:cjs && npm link",
|
|
45
43
|
"test-ts-decls": "./scripts/ts-tests.sh",
|
|
46
44
|
"posttest-ts-decls": "npm rm --location=global @splitsoftware/splitio-browserjs && npm install",
|
|
@@ -66,8 +64,7 @@
|
|
|
66
64
|
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
|
|
67
65
|
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
|
|
68
66
|
"dependencies": {
|
|
69
|
-
"@splitsoftware/
|
|
70
|
-
"@splitsoftware/splitio-commons": "1.9.2-rc.2",
|
|
67
|
+
"@splitsoftware/splitio-commons": "1.10.1-rc.0",
|
|
71
68
|
"@types/google.analytics": "0.0.40",
|
|
72
69
|
"unfetch": "^4.2.0"
|
|
73
70
|
},
|
package/src/settings/defaults.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/
|
|
|
2
2
|
import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types';
|
|
3
3
|
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';
|
|
4
4
|
|
|
5
|
-
const packageVersion = '0.10.2-rc.
|
|
5
|
+
const packageVersion = '0.10.2-rc.2';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
package/types/splitio.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
|
|
4
4
|
|
|
5
5
|
/// <reference types="google.analytics" />
|
|
6
|
-
import { SplitRumAgentConfig } from '@splitsoftware/browser-rum-agent';
|
|
7
6
|
|
|
8
7
|
export as namespace SplitIO;
|
|
9
8
|
export = SplitIO;
|
|
@@ -499,7 +498,12 @@ declare namespace SplitIO {
|
|
|
499
498
|
*/
|
|
500
499
|
configs: {
|
|
501
500
|
[treatmentName: string]: string
|
|
502
|
-
}
|
|
501
|
+
},
|
|
502
|
+
/**
|
|
503
|
+
* The default treatment of the feature flag.
|
|
504
|
+
* @property {string} defaultTreatment
|
|
505
|
+
*/
|
|
506
|
+
defaultTreatment: string,
|
|
503
507
|
};
|
|
504
508
|
/**
|
|
505
509
|
* A promise that resolves to a feature flag view.
|
|
@@ -1022,29 +1026,6 @@ declare namespace SplitIO {
|
|
|
1022
1026
|
pushRetryBackoffBase?: number,
|
|
1023
1027
|
}
|
|
1024
1028
|
}
|
|
1025
|
-
/**
|
|
1026
|
-
* Settings interface for Suite instances created on the browser.
|
|
1027
|
-
* @interface IBrowserSuiteSettings
|
|
1028
|
-
* @extends IBrowserSettings
|
|
1029
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
|
|
1030
|
-
*/
|
|
1031
|
-
interface IBrowserSuiteSettings extends IBrowserSettings {
|
|
1032
|
-
core: IBrowserBasicSettings['core'] & {
|
|
1033
|
-
/**
|
|
1034
|
-
* Traffic type of the identity provided to the RUM Agent for event tracking. @see {@link https://help.split.io/hc/en-us/articles/360019916311-Traffic-type}
|
|
1035
|
-
* If no provided, 'user' is used as default.
|
|
1036
|
-
* This does not affect the behavior of the SDK client: even if provided, you still need to specify the traffic type in `client.track()` calls.
|
|
1037
|
-
*
|
|
1038
|
-
* @property {string=} trafficType
|
|
1039
|
-
*/
|
|
1040
|
-
trafficType?: string,
|
|
1041
|
-
},
|
|
1042
|
-
/**
|
|
1043
|
-
* Optional configuration object for the RUM agent.
|
|
1044
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360030898431-Browser-RUM-agent#configuration}
|
|
1045
|
-
*/
|
|
1046
|
-
rumAgent?: SplitRumAgentConfig
|
|
1047
|
-
}
|
|
1048
1029
|
/**
|
|
1049
1030
|
* Settings interface with async storage for SDK instances created on the browser.
|
|
1050
1031
|
* If your storage is synchronous (by defaut we use memory, which is sync) use SplitIO.IBrowserSettings instead.
|
|
@@ -1167,41 +1148,6 @@ declare namespace SplitIO {
|
|
|
1167
1148
|
*/
|
|
1168
1149
|
manager(): IManager
|
|
1169
1150
|
}
|
|
1170
|
-
/**
|
|
1171
|
-
* This represents the interface for the Suite instance, that is an extension of the ISDK interface.
|
|
1172
|
-
* @interface ISuiteSDK
|
|
1173
|
-
* @extends ISDK
|
|
1174
|
-
*/
|
|
1175
|
-
interface ISuiteSDK extends ISDK {
|
|
1176
|
-
/**
|
|
1177
|
-
* Returns the default client instance of the SDK and adds its identity (i.e., user key and traffic type pair) to the RUM agent for event tracking.
|
|
1178
|
-
*
|
|
1179
|
-
* NOTE: if no traffic type is provided in the SDK config, 'user' will be used as default for the RUM Agent.
|
|
1180
|
-
*
|
|
1181
|
-
* @function client
|
|
1182
|
-
* @returns {IClient} The client instance.
|
|
1183
|
-
*/
|
|
1184
|
-
client(): IClient,
|
|
1185
|
-
/**
|
|
1186
|
-
* Returns a shared client of the SDK and adds its identity (i.e., user key and traffic type pair) to the RUM agent for event tracking.
|
|
1187
|
-
*
|
|
1188
|
-
* NOTE: if no traffic type is provided as second argument, 'user' will be used as default for the RUM Agent.
|
|
1189
|
-
*
|
|
1190
|
-
* @function client
|
|
1191
|
-
* @param {SplitKey} key The key for the new client instance.
|
|
1192
|
-
* @param {string=} trafficType The traffic type of the provided key, used to pass an identity to the RUM agent. If not provided, 'user' will be used as default.
|
|
1193
|
-
* @returns {IClient} The client instance.
|
|
1194
|
-
*/
|
|
1195
|
-
client(key: SplitKey, trafficType?: string): IClient
|
|
1196
|
-
/**
|
|
1197
|
-
* Destroys all client instances and remove identities from the RUM agent to stop tracking events for them.
|
|
1198
|
-
* This method will flush any pending impressions and events, and stop the synchronization of feature flag definitions with the backend.
|
|
1199
|
-
*
|
|
1200
|
-
* @function destroy
|
|
1201
|
-
* @returns {Promise<void>} A promise that resolves once the client is destroyed.
|
|
1202
|
-
*/
|
|
1203
|
-
destroy(): Promise<void>
|
|
1204
|
-
}
|
|
1205
1151
|
/**
|
|
1206
1152
|
* This represents the interface for the SDK instance with asynchronous storage and client-side API,
|
|
1207
1153
|
* i.e., where client instances have a bound user key.
|
|
@@ -1272,6 +1218,42 @@ declare namespace SplitIO {
|
|
|
1272
1218
|
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
|
|
1273
1219
|
*/
|
|
1274
1220
|
getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
|
|
1221
|
+
/**
|
|
1222
|
+
* Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
|
|
1223
|
+
* @function getTreatmentsByFlagSet
|
|
1224
|
+
* @param {string} key - The string key representing the consumer.
|
|
1225
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1226
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1227
|
+
* @returns {Treatments} The map with all the Treatment objects
|
|
1228
|
+
*/
|
|
1229
|
+
getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): Treatments,
|
|
1230
|
+
/**
|
|
1231
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
|
|
1232
|
+
* @function getTreatmentsWithConfigByFlagSet
|
|
1233
|
+
* @param {string} key - The string key representing the consumer.
|
|
1234
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1235
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1236
|
+
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
|
|
1237
|
+
*/
|
|
1238
|
+
getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
|
|
1239
|
+
/**
|
|
1240
|
+
* Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
|
|
1241
|
+
* @function getTreatmentsByFlagSets
|
|
1242
|
+
* @param {string} key - The string key representing the consumer.
|
|
1243
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1244
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1245
|
+
* @returns {Treatments} The map with all the Treatment objects
|
|
1246
|
+
*/
|
|
1247
|
+
getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): Treatments,
|
|
1248
|
+
/**
|
|
1249
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
|
|
1250
|
+
* @function getTreatmentsWithConfigByFlagSets
|
|
1251
|
+
* @param {string} key - The string key representing the consumer.
|
|
1252
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1253
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1254
|
+
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
|
|
1255
|
+
*/
|
|
1256
|
+
getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
|
|
1275
1257
|
/**
|
|
1276
1258
|
* Tracks an event to be fed to the results product on Split user interface.
|
|
1277
1259
|
* @function track
|
|
@@ -1332,6 +1314,46 @@ declare namespace SplitIO {
|
|
|
1332
1314
|
* @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
|
|
1333
1315
|
*/
|
|
1334
1316
|
getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
|
|
1317
|
+
/**
|
|
1318
|
+
* Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
|
|
1319
|
+
* For usage on NodeJS as we don't have only one key.
|
|
1320
|
+
* @function getTreatmentsByFlagSet
|
|
1321
|
+
* @param {string} key - The string key representing the consumer.
|
|
1322
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1323
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1324
|
+
* @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
|
|
1325
|
+
*/
|
|
1326
|
+
getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatments,
|
|
1327
|
+
/**
|
|
1328
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
|
|
1329
|
+
* For usage on NodeJS as we don't have only one key.
|
|
1330
|
+
* @function getTreatmentsWithConfigByFlagSet
|
|
1331
|
+
* @param {string} key - The string key representing the consumer.
|
|
1332
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1333
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1334
|
+
* @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
|
|
1335
|
+
*/
|
|
1336
|
+
getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatmentWithConfig,
|
|
1337
|
+
/**
|
|
1338
|
+
* Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
|
|
1339
|
+
* For usage on NodeJS as we don't have only one key.
|
|
1340
|
+
* @function getTreatmentsByFlagSets
|
|
1341
|
+
* @param {string} key - The string key representing the consumer.
|
|
1342
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1343
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1344
|
+
* @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
|
|
1345
|
+
*/
|
|
1346
|
+
getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatments,
|
|
1347
|
+
/**
|
|
1348
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
|
|
1349
|
+
* For usage on NodeJS as we don't have only one key.
|
|
1350
|
+
* @function getTreatmentsWithConfigByFlagSets
|
|
1351
|
+
* @param {string} key - The string key representing the consumer.
|
|
1352
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1353
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1354
|
+
* @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
|
|
1355
|
+
*/
|
|
1356
|
+
getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatmentWithConfig,
|
|
1335
1357
|
/**
|
|
1336
1358
|
* Tracks an event to be fed to the results product on Split user interface, and returns a promise to signal when the event was successfully queued (or not).
|
|
1337
1359
|
* @function track
|
|
@@ -1382,6 +1404,38 @@ declare namespace SplitIO {
|
|
|
1382
1404
|
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
|
|
1383
1405
|
*/
|
|
1384
1406
|
getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
|
|
1407
|
+
/**
|
|
1408
|
+
* Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
|
|
1409
|
+
* @function getTreatmentsByFlagSet
|
|
1410
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1411
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1412
|
+
* @returns {Treatments} The map with all the Treatments objects
|
|
1413
|
+
*/
|
|
1414
|
+
getTreatmentsByFlagSet(flagSet: string, attributes?: Attributes): Treatments,
|
|
1415
|
+
/**
|
|
1416
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag set.
|
|
1417
|
+
* @function getTreatmentsWithConfigByFlagSet
|
|
1418
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1419
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1420
|
+
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
|
|
1421
|
+
*/
|
|
1422
|
+
getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
|
|
1423
|
+
/**
|
|
1424
|
+
* Returns a Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
|
|
1425
|
+
* @function getTreatmentsByFlagSets
|
|
1426
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1427
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1428
|
+
* @returns {Treatments} The map with all the Treatments objects
|
|
1429
|
+
*/
|
|
1430
|
+
getTreatmentsByFlagSets(flagSets: string[], attributes?: Attributes): Treatments,
|
|
1431
|
+
/**
|
|
1432
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
|
|
1433
|
+
* @function getTreatmentsWithConfigByFlagSets
|
|
1434
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1435
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1436
|
+
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
|
|
1437
|
+
*/
|
|
1438
|
+
getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
|
|
1385
1439
|
/**
|
|
1386
1440
|
* Tracks an event to be fed to the results product on Split user interface.
|
|
1387
1441
|
* @function track
|
|
@@ -1469,9 +1523,41 @@ declare namespace SplitIO {
|
|
|
1469
1523
|
* @function getTreatmentsWithConfig
|
|
1470
1524
|
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
|
|
1471
1525
|
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1472
|
-
* @returns {
|
|
1526
|
+
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
|
|
1473
1527
|
*/
|
|
1474
1528
|
getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
|
|
1529
|
+
/**
|
|
1530
|
+
* Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
|
|
1531
|
+
* @function getTreatmentsByFlagSet
|
|
1532
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1533
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1534
|
+
* @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
|
|
1535
|
+
*/
|
|
1536
|
+
getTreatmentsByFlagSet(flagSet: string, attributes?: Attributes): AsyncTreatments,
|
|
1537
|
+
/**
|
|
1538
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag set.
|
|
1539
|
+
* @function getTreatmentsWithConfigByFlagSet
|
|
1540
|
+
* @param {string} flagSet - The flag set name we want to get the treatments.
|
|
1541
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1542
|
+
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
|
|
1543
|
+
*/
|
|
1544
|
+
getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): AsyncTreatmentsWithConfig,
|
|
1545
|
+
/**
|
|
1546
|
+
* Returns a Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
|
|
1547
|
+
* @function getTreatmentsByFlagSets
|
|
1548
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1549
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1550
|
+
* @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
|
|
1551
|
+
*/
|
|
1552
|
+
getTreatmentsByFlagSets(flagSets: string[], attributes?: Attributes): AsyncTreatments,
|
|
1553
|
+
/**
|
|
1554
|
+
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
|
|
1555
|
+
* @function getTreatmentsWithConfigByFlagSets
|
|
1556
|
+
* @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
|
|
1557
|
+
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
|
|
1558
|
+
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
|
|
1559
|
+
*/
|
|
1560
|
+
getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
|
|
1475
1561
|
/**
|
|
1476
1562
|
* Tracks an event to be fed to the results product on Split user interface, and returns a promise to signal when the event was successfully queued (or not).
|
|
1477
1563
|
* @function track
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SplitSuite = void 0;
|
|
4
|
-
var objectAssign_1 = require("@splitsoftware/splitio-commons/cjs/utils/lang/objectAssign");
|
|
5
|
-
var sets_1 = require("@splitsoftware/splitio-commons/cjs/utils/lang/sets");
|
|
6
|
-
var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
|
|
7
|
-
var browser_rum_agent_1 = require("@splitsoftware/browser-rum-agent");
|
|
8
|
-
var splitFactory_1 = require("../full/splitFactory");
|
|
9
|
-
var DEFAULT_TRAFFIC_TYPE = 'user';
|
|
10
|
-
/**
|
|
11
|
-
* SplitFactory for client-side with RUM Agent.
|
|
12
|
-
*
|
|
13
|
-
* @param config configuration object used to instantiate the Suite
|
|
14
|
-
* @param __updateModules optional function that lets redefine internal SDK modules. Use with
|
|
15
|
-
* caution since, unlike `config`, this param is not validated neither considered part of the public API.
|
|
16
|
-
* @throws Will throw an error if the provided config is invalid.
|
|
17
|
-
*/
|
|
18
|
-
function SplitSuite(config, __updateModules) {
|
|
19
|
-
var sdk = (0, splitFactory_1.SplitFactory)(config, __updateModules);
|
|
20
|
-
var settings = sdk.settings;
|
|
21
|
-
// Do not setup RUM Agent if not in standalone mode
|
|
22
|
-
if (settings.mode !== constants_1.STANDALONE_MODE)
|
|
23
|
-
return sdk;
|
|
24
|
-
// Setup RUM Agent
|
|
25
|
-
var agentConfig = browser_rum_agent_1.SplitRumAgent.__getConfig();
|
|
26
|
-
if (agentConfig.a) {
|
|
27
|
-
settings.log.warn('RUM Agent already setup. The new Suite instance will reset the RUM Agent configuration.');
|
|
28
|
-
}
|
|
29
|
-
agentConfig.log = settings.log;
|
|
30
|
-
browser_rum_agent_1.SplitRumAgent.removeIdentities(); // reset identities for new Suite
|
|
31
|
-
browser_rum_agent_1.SplitRumAgent.setup(settings.core.authorizationKey, (0, objectAssign_1.objectAssign)({
|
|
32
|
-
url: settings.urls.events,
|
|
33
|
-
userConsent: settings.userConsent
|
|
34
|
-
}, settings.rumAgent));
|
|
35
|
-
var clients = new sets_1._Set();
|
|
36
|
-
// Override UserConsent.setStatus to update RUM Agent consent
|
|
37
|
-
var originalSetStatus = sdk.UserConsent.setStatus;
|
|
38
|
-
sdk.UserConsent.setStatus = function (newStatus) {
|
|
39
|
-
browser_rum_agent_1.SplitRumAgent.setUserConsent(newStatus);
|
|
40
|
-
return originalSetStatus.apply(this, arguments);
|
|
41
|
-
};
|
|
42
|
-
// Create Suite instance extending SDK
|
|
43
|
-
return (0, objectAssign_1.objectAssign)({}, sdk, {
|
|
44
|
-
client: function () {
|
|
45
|
-
var client = sdk.client.apply(sdk, arguments);
|
|
46
|
-
if (!clients.has(client)) {
|
|
47
|
-
clients.add(client);
|
|
48
|
-
browser_rum_agent_1.SplitRumAgent.addIdentity({
|
|
49
|
-
key: client.key,
|
|
50
|
-
// For main client, use trafficType from settings. For shared clients, use second argument. If not provided, use default.
|
|
51
|
-
trafficType: (arguments[0] ? arguments[1] : settings.core.trafficType) || DEFAULT_TRAFFIC_TYPE
|
|
52
|
-
});
|
|
53
|
-
// override client.destroy to remove identity from RUM Agent
|
|
54
|
-
var originalDestroy_1 = client.destroy;
|
|
55
|
-
client.destroy = function () {
|
|
56
|
-
browser_rum_agent_1.SplitRumAgent.removeIdentity({
|
|
57
|
-
key: client.key,
|
|
58
|
-
trafficType: client.trafficType || DEFAULT_TRAFFIC_TYPE
|
|
59
|
-
});
|
|
60
|
-
return originalDestroy_1.apply(client, arguments);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return client;
|
|
64
|
-
},
|
|
65
|
-
destroy: function () {
|
|
66
|
-
return Promise.all((0, sets_1.setToArray)(clients).map(function (client) { return client.destroy(); }));
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
exports.SplitSuite = SplitSuite;
|
package/cjs/suite/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DebugLogger = exports.InfoLogger = exports.WarnLogger = exports.ErrorLogger = exports.InLocalStorage = exports.SplitSuite = void 0;
|
|
4
|
-
var browserSuite_1 = require("./browserSuite");
|
|
5
|
-
Object.defineProperty(exports, "SplitSuite", { enumerable: true, get: function () { return browserSuite_1.SplitSuite; } });
|
|
6
|
-
var index_1 = require("@splitsoftware/splitio-commons/cjs/storages/inLocalStorage/index");
|
|
7
|
-
Object.defineProperty(exports, "InLocalStorage", { enumerable: true, get: function () { return index_1.InLocalStorage; } });
|
|
8
|
-
var ErrorLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/ErrorLogger");
|
|
9
|
-
Object.defineProperty(exports, "ErrorLogger", { enumerable: true, get: function () { return ErrorLogger_1.ErrorLogger; } });
|
|
10
|
-
var WarnLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/WarnLogger");
|
|
11
|
-
Object.defineProperty(exports, "WarnLogger", { enumerable: true, get: function () { return WarnLogger_1.WarnLogger; } });
|
|
12
|
-
var InfoLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/InfoLogger");
|
|
13
|
-
Object.defineProperty(exports, "InfoLogger", { enumerable: true, get: function () { return InfoLogger_1.InfoLogger; } });
|
|
14
|
-
var DebugLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/DebugLogger");
|
|
15
|
-
Object.defineProperty(exports, "DebugLogger", { enumerable: true, get: function () { return DebugLogger_1.DebugLogger; } });
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { objectAssign } from '@splitsoftware/splitio-commons/esm/utils/lang/objectAssign';
|
|
2
|
-
import { _Set, setToArray } from '@splitsoftware/splitio-commons/esm/utils/lang/sets';
|
|
3
|
-
import { STANDALONE_MODE } from '@splitsoftware/splitio-commons/esm/utils/constants';
|
|
4
|
-
import { SplitRumAgent } from '@splitsoftware/browser-rum-agent';
|
|
5
|
-
import { SplitFactory } from '../full/splitFactory';
|
|
6
|
-
var DEFAULT_TRAFFIC_TYPE = 'user';
|
|
7
|
-
/**
|
|
8
|
-
* SplitFactory for client-side with RUM Agent.
|
|
9
|
-
*
|
|
10
|
-
* @param config configuration object used to instantiate the Suite
|
|
11
|
-
* @param __updateModules optional function that lets redefine internal SDK modules. Use with
|
|
12
|
-
* caution since, unlike `config`, this param is not validated neither considered part of the public API.
|
|
13
|
-
* @throws Will throw an error if the provided config is invalid.
|
|
14
|
-
*/
|
|
15
|
-
export function SplitSuite(config, __updateModules) {
|
|
16
|
-
var sdk = SplitFactory(config, __updateModules);
|
|
17
|
-
var settings = sdk.settings;
|
|
18
|
-
// Do not setup RUM Agent if not in standalone mode
|
|
19
|
-
if (settings.mode !== STANDALONE_MODE)
|
|
20
|
-
return sdk;
|
|
21
|
-
// Setup RUM Agent
|
|
22
|
-
var agentConfig = SplitRumAgent.__getConfig();
|
|
23
|
-
if (agentConfig.a) {
|
|
24
|
-
settings.log.warn('RUM Agent already setup. The new Suite instance will reset the RUM Agent configuration.');
|
|
25
|
-
}
|
|
26
|
-
agentConfig.log = settings.log;
|
|
27
|
-
SplitRumAgent.removeIdentities(); // reset identities for new Suite
|
|
28
|
-
SplitRumAgent.setup(settings.core.authorizationKey, objectAssign({
|
|
29
|
-
url: settings.urls.events,
|
|
30
|
-
userConsent: settings.userConsent
|
|
31
|
-
}, settings.rumAgent));
|
|
32
|
-
var clients = new _Set();
|
|
33
|
-
// Override UserConsent.setStatus to update RUM Agent consent
|
|
34
|
-
var originalSetStatus = sdk.UserConsent.setStatus;
|
|
35
|
-
sdk.UserConsent.setStatus = function (newStatus) {
|
|
36
|
-
SplitRumAgent.setUserConsent(newStatus);
|
|
37
|
-
return originalSetStatus.apply(this, arguments);
|
|
38
|
-
};
|
|
39
|
-
// Create Suite instance extending SDK
|
|
40
|
-
return objectAssign({}, sdk, {
|
|
41
|
-
client: function () {
|
|
42
|
-
var client = sdk.client.apply(sdk, arguments);
|
|
43
|
-
if (!clients.has(client)) {
|
|
44
|
-
clients.add(client);
|
|
45
|
-
SplitRumAgent.addIdentity({
|
|
46
|
-
key: client.key,
|
|
47
|
-
// For main client, use trafficType from settings. For shared clients, use second argument. If not provided, use default.
|
|
48
|
-
trafficType: (arguments[0] ? arguments[1] : settings.core.trafficType) || DEFAULT_TRAFFIC_TYPE
|
|
49
|
-
});
|
|
50
|
-
// override client.destroy to remove identity from RUM Agent
|
|
51
|
-
var originalDestroy_1 = client.destroy;
|
|
52
|
-
client.destroy = function () {
|
|
53
|
-
SplitRumAgent.removeIdentity({
|
|
54
|
-
key: client.key,
|
|
55
|
-
trafficType: client.trafficType || DEFAULT_TRAFFIC_TYPE
|
|
56
|
-
});
|
|
57
|
-
return originalDestroy_1.apply(client, arguments);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return client;
|
|
61
|
-
},
|
|
62
|
-
destroy: function () {
|
|
63
|
-
return Promise.all(setToArray(clients).map(function (client) { return client.destroy(); }));
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
package/esm/suite/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { SplitSuite } from './browserSuite';
|
|
2
|
-
export { InLocalStorage } from '@splitsoftware/splitio-commons/esm/storages/inLocalStorage/index';
|
|
3
|
-
export { ErrorLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/ErrorLogger';
|
|
4
|
-
export { WarnLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/WarnLogger';
|
|
5
|
-
export { InfoLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/InfoLogger';
|
|
6
|
-
export { DebugLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/DebugLogger';
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { objectAssign } from '@splitsoftware/splitio-commons/src/utils/lang/objectAssign';
|
|
2
|
-
import { _Set, setToArray } from '@splitsoftware/splitio-commons/src/utils/lang/sets';
|
|
3
|
-
import { STANDALONE_MODE } from '@splitsoftware/splitio-commons/src/utils/constants';
|
|
4
|
-
import { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFactory/types';
|
|
5
|
-
import { SplitRumAgent } from '@splitsoftware/browser-rum-agent';
|
|
6
|
-
import { SplitFactory } from '../full/splitFactory';
|
|
7
|
-
import { IBrowserSuiteSettings } from '../../types/splitio';
|
|
8
|
-
|
|
9
|
-
const DEFAULT_TRAFFIC_TYPE = 'user';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* SplitFactory for client-side with RUM Agent.
|
|
13
|
-
*
|
|
14
|
-
* @param config configuration object used to instantiate the Suite
|
|
15
|
-
* @param __updateModules optional function that lets redefine internal SDK modules. Use with
|
|
16
|
-
* caution since, unlike `config`, this param is not validated neither considered part of the public API.
|
|
17
|
-
* @throws Will throw an error if the provided config is invalid.
|
|
18
|
-
*/
|
|
19
|
-
export function SplitSuite(config: IBrowserSuiteSettings, __updateModules?: (modules: ISdkFactoryParams) => void) {
|
|
20
|
-
const sdk = SplitFactory(config, __updateModules) as any;
|
|
21
|
-
|
|
22
|
-
const settings = sdk.settings;
|
|
23
|
-
|
|
24
|
-
// Do not setup RUM Agent if not in standalone mode
|
|
25
|
-
if (settings.mode !== STANDALONE_MODE) return sdk;
|
|
26
|
-
|
|
27
|
-
// Setup RUM Agent
|
|
28
|
-
const agentConfig = SplitRumAgent.__getConfig();
|
|
29
|
-
if (agentConfig.a) {
|
|
30
|
-
settings.log.warn('RUM Agent already setup. The new Suite instance will reset the RUM Agent configuration.');
|
|
31
|
-
}
|
|
32
|
-
agentConfig.log = settings.log;
|
|
33
|
-
SplitRumAgent.removeIdentities(); // reset identities for new Suite
|
|
34
|
-
SplitRumAgent.setup(settings.core.authorizationKey, objectAssign({
|
|
35
|
-
url: settings.urls.events,
|
|
36
|
-
userConsent: settings.userConsent
|
|
37
|
-
}, settings.rumAgent));
|
|
38
|
-
|
|
39
|
-
const clients = new _Set();
|
|
40
|
-
|
|
41
|
-
// Override UserConsent.setStatus to update RUM Agent consent
|
|
42
|
-
const originalSetStatus = sdk.UserConsent.setStatus;
|
|
43
|
-
sdk.UserConsent.setStatus = function (newStatus: boolean) {
|
|
44
|
-
SplitRumAgent.setUserConsent(newStatus);
|
|
45
|
-
return originalSetStatus.apply(this, arguments);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// Create Suite instance extending SDK
|
|
49
|
-
return objectAssign({}, sdk, {
|
|
50
|
-
client() {
|
|
51
|
-
const client = sdk.client.apply(sdk, arguments);
|
|
52
|
-
|
|
53
|
-
if (!clients.has(client)) {
|
|
54
|
-
clients.add(client);
|
|
55
|
-
|
|
56
|
-
SplitRumAgent.addIdentity({
|
|
57
|
-
key: client.key,
|
|
58
|
-
// For main client, use trafficType from settings. For shared clients, use second argument. If not provided, use default.
|
|
59
|
-
trafficType: (arguments[0] ? arguments[1] : settings.core.trafficType) || DEFAULT_TRAFFIC_TYPE
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// override client.destroy to remove identity from RUM Agent
|
|
63
|
-
const originalDestroy = client.destroy;
|
|
64
|
-
client.destroy = function () {
|
|
65
|
-
SplitRumAgent.removeIdentity({
|
|
66
|
-
key: client.key,
|
|
67
|
-
trafficType: client.trafficType || DEFAULT_TRAFFIC_TYPE
|
|
68
|
-
});
|
|
69
|
-
return originalDestroy.apply(client, arguments);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return client;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
destroy() {
|
|
77
|
-
return Promise.all(setToArray(clients).map(client => client.destroy()));
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
package/src/suite/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { SplitSuite } from './browserSuite';
|
|
2
|
-
export { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index';
|
|
3
|
-
export { ErrorLogger } from '@splitsoftware/splitio-commons/src/logger/browser/ErrorLogger';
|
|
4
|
-
export { WarnLogger } from '@splitsoftware/splitio-commons/src/logger/browser/WarnLogger';
|
|
5
|
-
export { InfoLogger } from '@splitsoftware/splitio-commons/src/logger/browser/InfoLogger';
|
|
6
|
-
export { DebugLogger } from '@splitsoftware/splitio-commons/src/logger/browser/DebugLogger';
|
package/suite/package.json
DELETED
package/types/suite/index.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// Declaration file for JavaScript Browser Split Software SDK
|
|
2
|
-
// Project: http://www.split.io/
|
|
3
|
-
|
|
4
|
-
/// <reference path="../splitio.d.ts" />
|
|
5
|
-
export = JsSdk;
|
|
6
|
-
|
|
7
|
-
declare module JsSdk {
|
|
8
|
-
/**
|
|
9
|
-
* Split.io Suite factory function.
|
|
10
|
-
*
|
|
11
|
-
* The settings parameter should be an object that complies with the SplitIO.IBrowserSuiteSettings.
|
|
12
|
-
* For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360030898431-Browser-RUM-agent#sdk-integration}
|
|
13
|
-
*/
|
|
14
|
-
export function SplitSuite(settings: SplitIO.IBrowserSuiteSettings): SplitIO.ISuiteSDK;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Persistent storage based on the LocalStorage Web API for browsers.
|
|
18
|
-
*
|
|
19
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#storage}
|
|
20
|
-
*/
|
|
21
|
-
export function InLocalStorage(options?: SplitIO.InLocalStorageOptions): SplitIO.StorageSyncFactory;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Creates a logger instance that enables descriptive log messages with DEBUG log level when passed in the factory settings.
|
|
25
|
-
*
|
|
26
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
27
|
-
*/
|
|
28
|
-
export function DebugLogger(): SplitIO.ILogger;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Creates a logger instance that enables descriptive log messages with INFO log level when passed in the factory settings.
|
|
32
|
-
*
|
|
33
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
34
|
-
*/
|
|
35
|
-
export function InfoLogger(): SplitIO.ILogger;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Creates a logger instance that enables descriptive log messages with WARN log level when passed in the factory settings.
|
|
39
|
-
*
|
|
40
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
41
|
-
*/
|
|
42
|
-
export function WarnLogger(): SplitIO.ILogger;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Creates a logger instance that enables descriptive log messages with ERROR log level when passed in the factory settings.
|
|
46
|
-
*
|
|
47
|
-
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
48
|
-
*/
|
|
49
|
-
export function ErrorLogger(): SplitIO.ILogger;
|
|
50
|
-
}
|