@statsig/client-core
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "@statsig/client-core", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "1.0.1"; | ||
export declare const SDK_VERSION = "1.1.0"; | ||
export type StatsigMetadata = { | ||
@@ -3,0 +3,0 @@ readonly [key: string]: string | undefined; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0; | ||
exports.SDK_VERSION = '1.0.1'; | ||
exports.SDK_VERSION = '1.1.0'; | ||
let metadata = { | ||
@@ -6,0 +6,0 @@ sdkVersion: exports.SDK_VERSION, |
@@ -30,13 +30,2 @@ import { LogLevel } from './Log'; | ||
/** | ||
* The maximum amount of time (in milliseconds) that any network request can take | ||
* before timing out. | ||
* | ||
* default: `10,000 ms` (10 seconds) | ||
*/ | ||
networkTimeoutMs?: number; | ||
/** | ||
* Intended for testing purposes. Prevents any network requests being made. | ||
*/ | ||
preventAllNetworkTraffic?: boolean; | ||
/** | ||
* Overrides the default networking layer used by the Statsig client. | ||
@@ -53,2 +42,13 @@ * By default, the client use `fetch`, but overriding this | ||
networkOverrideFunc?: (url: string, args: NetworkArgs) => Promise<Response>; | ||
/** | ||
* The maximum amount of time (in milliseconds) that any network request can take | ||
* before timing out. | ||
* | ||
* default: `10,000 ms` (10 seconds) | ||
*/ | ||
networkTimeoutMs?: number; | ||
/** | ||
* Intended for testing purposes. Prevents any network requests being made. | ||
*/ | ||
preventAllNetworkTraffic?: boolean; | ||
}; | ||
@@ -58,8 +58,14 @@ /** Options for configuring a Statsig client. */ | ||
/** | ||
* Allows for fine grained control over which api or urls are hit for specific Statsig network requests. | ||
* Whether or not Statsig should compress JSON bodies for network requests where possible. | ||
* | ||
* For defaults see {@link StatsigClientUrlOverrideOptions} | ||
* default: `false` | ||
*/ | ||
networkConfig?: NetworkConfig; | ||
disableCompression?: boolean; | ||
/** | ||
* Whether or not Statsig should use raw JSON for network requests where possible. | ||
* | ||
* default: `false` | ||
*/ | ||
disableStatsigEncoding?: boolean; | ||
/** | ||
* An object you can use to set environment variables that apply to all of your users | ||
@@ -70,2 +76,8 @@ * in the same session. | ||
/** | ||
* (Web only) Should the 'current page' url be included with logged events. | ||
* | ||
* default: true | ||
*/ | ||
includeCurrentPageUrlWithEvents?: boolean; | ||
/** | ||
* How much information is allowed to be printed to the console. | ||
@@ -85,6 +97,12 @@ * | ||
* | ||
* default: `10,000 ms` (10 seconds) | ||
* default: `10,000 ms` (10 seconds) | ||
*/ | ||
loggingIntervalMs?: number; | ||
/** | ||
* Allows for fine grained control over which api or urls are hit for specific Statsig network requests. | ||
* | ||
* For defaults see {@link StatsigClientUrlOverrideOptions} | ||
*/ | ||
networkConfig?: NetworkConfig; | ||
/** | ||
* An implementor of {@link OverrideAdapter}, used to alter evaluations before its | ||
@@ -94,20 +112,2 @@ * returned to the caller of a check api (checkGate/getExperiment etc). | ||
overrideAdapter?: OverrideAdapter; | ||
/** | ||
* (Web only) Should the 'current page' url be included with logged events. | ||
* | ||
* default: true | ||
*/ | ||
includeCurrentPageUrlWithEvents?: boolean; | ||
/** | ||
* Whether or not Statsig should use raw JSON for network requests where possible. | ||
* | ||
* default: `false` | ||
*/ | ||
disableStatsigEncoding?: boolean; | ||
/** | ||
* Whether or not Statsig should compress JSON bodies for network requests where possible. | ||
* | ||
* default: `false` | ||
*/ | ||
disableCompression?: boolean; | ||
}; | ||
@@ -114,0 +114,0 @@ export type AnyStatsigOptions = StatsigOptionsCommon<NetworkConfigCommon>; |
115867