@statsig/js-client
Advanced tools
Comparing version 0.0.1-beta.23 to 0.0.1-beta.24
{ | ||
"name": "@statsig/js-client", | ||
"version": "0.0.1-beta.23", | ||
"version": "0.0.1-beta.24", | ||
"dependencies": { | ||
"@statsig/client-core": "0.0.1-beta.23" | ||
"@statsig/client-core": "0.0.1-beta.24" | ||
}, | ||
@@ -7,0 +7,0 @@ "jsdelivr": "./build/statsig-js-client.min.js", |
@@ -1,2 +0,2 @@ | ||
import { DynamicConfig, DynamicConfigEvaluationOptions, EvaluationsDataAdapter, Experiment, ExperimentEvaluationOptions, FeatureGate, FeatureGateEvaluationOptions, Layer, LayerEvaluationOptions, PrecomputedEvaluationsContext, PrecomputedEvaluationsInterface, StatsigClientBase, StatsigEvent, StatsigUser } from '@statsig/client-core'; | ||
import { DynamicConfig, DynamicConfigEvaluationOptions, EvaluationsDataAdapter, Experiment, ExperimentEvaluationOptions, FeatureGate, FeatureGateEvaluationOptions, Layer, LayerEvaluationOptions, PrecomputedEvaluationsAsyncContext, PrecomputedEvaluationsContext, PrecomputedEvaluationsInterface, StatsigClientBase, StatsigEvent, StatsigUser } from '@statsig/client-core'; | ||
import './StatsigMetadataAdditions'; | ||
@@ -8,2 +8,3 @@ import type { StatsigOptions } from './StatsigOptions'; | ||
constructor(sdkKey: string, user: StatsigUser, options?: StatsigOptions | null); | ||
static instance(sdkKey?: string): StatsigClient | undefined; | ||
initializeSync(): void; | ||
@@ -15,2 +16,3 @@ initializeAsync(): Promise<void>; | ||
getContext(): PrecomputedEvaluationsContext; | ||
getAsyncContext(): Promise<PrecomputedEvaluationsAsyncContext>; | ||
getFeatureGate(name: string, options?: FeatureGateEvaluationOptions): FeatureGate; | ||
@@ -17,0 +19,0 @@ getDynamicConfig(name: string, options?: DynamicConfigEvaluationOptions): DynamicConfig; |
@@ -29,2 +29,10 @@ "use strict"; | ||
} | ||
static instance(sdkKey) { | ||
var _a; | ||
__STATSIG__ = __STATSIG__ !== null && __STATSIG__ !== void 0 ? __STATSIG__ : {}; | ||
if (sdkKey == null) { | ||
return __STATSIG__.lastInstance; | ||
} | ||
return (_a = __STATSIG__.instances) === null || _a === void 0 ? void 0 : _a[sdkKey]; | ||
} | ||
initializeSync() { | ||
@@ -67,3 +75,2 @@ this.updateUserSync(this._user); | ||
options: this._options, | ||
sessionID: client_core_1.SessionID.get(this._sdkKey), | ||
values: this._store.getValues(), | ||
@@ -73,2 +80,7 @@ user: JSON.parse(JSON.stringify(this._user)), | ||
} | ||
getAsyncContext() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return Object.assign(Object.assign({}, this.getContext()), { sessionID: yield client_core_1.SessionID.get(this._sdkKey), stableID: yield client_core_1.StableID.get(this._sdkKey) }); | ||
}); | ||
} | ||
getFeatureGate(name, options) { | ||
@@ -75,0 +87,0 @@ var _a, _b; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
61795
21
530
2
+ Added@statsig/client-core@0.0.1-beta.24(transitive)
- Removed@statsig/client-core@0.0.1-beta.23(transitive)