@statsig/client-core
Advanced tools
+1
-1
| { | ||
| "name": "@statsig/client-core", | ||
| "version": "3.11.1", | ||
| "version": "3.12.0", | ||
| "dependencies": {}, | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
@@ -1,2 +0,2 @@ | ||
| import { DataAdapterAsyncOptions, DataAdapterResult } from './StatsigDataAdapter'; | ||
| import { DataAdapterAsyncOptions, DataAdapterResult, DataSource } from './StatsigDataAdapter'; | ||
| import { AnyStatsigOptions } from './StatsigOptionsCommon'; | ||
@@ -26,1 +26,2 @@ import { StatsigUser, StatsigUserInternal } from './StatsigUser'; | ||
| } | ||
| export declare function _makeDataAdapterResult(source: DataSource, data: string, stableID: string | null, user?: StatsigUser): DataAdapterResult; |
@@ -12,3 +12,3 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.DataAdapterCore = void 0; | ||
| exports._makeDataAdapterResult = exports.DataAdapterCore = void 0; | ||
| const Log_1 = require("./Log"); | ||
@@ -150,2 +150,3 @@ const StableID_1 = require("./StableID"); | ||
| } | ||
| exports._makeDataAdapterResult = _makeDataAdapterResult; | ||
| class InMemoryCache { | ||
@@ -152,0 +153,0 @@ constructor() { |
@@ -26,3 +26,3 @@ "use strict"; | ||
| const DEDUPER_WINDOW_DURATION_MS = 600000; | ||
| const MAX_FAILED_LOGS = 1000; | ||
| const MAX_FAILED_LOGS = 500; | ||
| const QUICK_FLUSH_WINDOW_MS = 200; | ||
@@ -177,2 +177,6 @@ const EVENT_LOGGER_MAP = {}; | ||
| ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.networkConfig) === null || _b === void 0 ? void 0 : _b.networkOverrideFunc) == null; | ||
| this._emitter({ | ||
| name: 'pre_logs_flushed', | ||
| events, | ||
| }); | ||
| const response = shouldUseBeacon | ||
@@ -179,0 +183,0 @@ ? yield this._sendEventsViaBeacon(events) |
+4
-4
@@ -23,3 +23,3 @@ "use strict"; | ||
| static info(...args) { | ||
| if (this.level >= exports.LogLevel.Info) { | ||
| if (Log.level >= exports.LogLevel.Info) { | ||
| console.info(_INFO, ...addTag(args)); | ||
@@ -29,3 +29,3 @@ } | ||
| static debug(...args) { | ||
| if (this.level >= exports.LogLevel.Debug) { | ||
| if (Log.level >= exports.LogLevel.Debug) { | ||
| console.debug(DEBUG, ...addTag(args)); | ||
@@ -35,3 +35,3 @@ } | ||
| static warn(...args) { | ||
| if (this.level >= exports.LogLevel.Warn) { | ||
| if (Log.level >= exports.LogLevel.Warn) { | ||
| console.warn(_WARN, ...addTag(args)); | ||
@@ -41,3 +41,3 @@ } | ||
| static error(...args) { | ||
| if (this.level >= exports.LogLevel.Error) { | ||
| if (Log.level >= exports.LogLevel.Error) { | ||
| console.error(ERROR, ...addTag(args)); | ||
@@ -44,0 +44,0 @@ } |
@@ -24,2 +24,5 @@ import { DataAdapterResult } from './StatsigDataAdapter'; | ||
| error: ErrorEventData; | ||
| pre_logs_flushed: { | ||
| events: Record<string, unknown>[]; | ||
| }; | ||
| logs_flushed: { | ||
@@ -52,2 +55,4 @@ events: Record<string, unknown>[]; | ||
| * | ||
| * `pre_logs_flushed` - Fired just before queued StatsigEvents are flushed to Statsig servers. | ||
| * | ||
| * `logs_flushed` - When queued StatsigEvents are flushed to Statsig servers. | ||
@@ -54,0 +59,0 @@ * |
@@ -1,2 +0,2 @@ | ||
| export declare const SDK_VERSION = "3.11.1"; | ||
| export declare const SDK_VERSION = "3.12.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 = '3.11.1'; | ||
| exports.SDK_VERSION = '3.12.0'; | ||
| let metadata = { | ||
@@ -6,0 +6,0 @@ sdkVersion: exports.SDK_VERSION, |
@@ -15,7 +15,7 @@ "use strict"; | ||
| const result = JSON.parse(data); | ||
| if (typeof result === 'object' && | ||
| if (result && | ||
| typeof result === 'object' && | ||
| guard in result) { | ||
| return result; | ||
| } | ||
| return result; | ||
| } | ||
@@ -22,0 +22,0 @@ catch (_a) { |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
155986
0.35%3751
0.29%