@statsig/client-core 3.3.0-beta.2 → 3.3.0-beta.3
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/package.json
CHANGED
package/src/NetworkCore.js
CHANGED
|
@@ -135,7 +135,12 @@ class NetworkCore {
|
|
|
135
135
|
if (!retries ||
|
|
136
136
|
currentAttempt > retries ||
|
|
137
137
|
!RETRYABLE_CODES.has((_b = response === null || response === void 0 ? void 0 : response.status) !== null && _b !== void 0 ? _b : 500)) {
|
|
138
|
-
(_c = this._emitter) === null || _c === void 0 ? void 0 : _c.call(this, {
|
|
138
|
+
(_c = this._emitter) === null || _c === void 0 ? void 0 : _c.call(this, {
|
|
139
|
+
name: 'error',
|
|
140
|
+
error,
|
|
141
|
+
tag: StatsigClientEventEmitter_1.ErrorTag.NetworkError,
|
|
142
|
+
requestArgs: args,
|
|
143
|
+
});
|
|
139
144
|
Log_1.Log.error(`A networking error occured during ${method} request to ${populatedUrl}.`, errorMessage, error);
|
|
140
145
|
return null;
|
|
141
146
|
}
|
|
@@ -6,16 +6,21 @@ export declare const ErrorTag: {
|
|
|
6
6
|
readonly NetworkError: "NetworkError";
|
|
7
7
|
};
|
|
8
8
|
export type ErrorTag = (typeof ErrorTag)[keyof typeof ErrorTag];
|
|
9
|
+
type ErrorEventData = {
|
|
10
|
+
error: unknown;
|
|
11
|
+
tag: ErrorTag | string;
|
|
12
|
+
} | {
|
|
13
|
+
error: unknown;
|
|
14
|
+
tag: 'NetworkError';
|
|
15
|
+
requestArgs: Record<string, unknown>;
|
|
16
|
+
};
|
|
9
17
|
type EventNameToEventDataMap = {
|
|
10
18
|
values_updated: {
|
|
11
19
|
status: StatsigLoadingStatus;
|
|
12
20
|
values: DataAdapterResult | null;
|
|
13
21
|
};
|
|
14
22
|
session_expired: object;
|
|
15
|
-
error:
|
|
16
|
-
error: unknown;
|
|
17
|
-
tag: ErrorTag | string;
|
|
18
|
-
};
|
|
23
|
+
error: ErrorEventData;
|
|
19
24
|
logs_flushed: {
|
|
20
25
|
events: Record<string, unknown>[];
|
|
21
26
|
};
|
|
@@ -39,12 +44,16 @@ type EventNameToEventDataMap = {
|
|
|
39
44
|
*
|
|
40
45
|
* `values_updated` - When the Statsig clients internal values change as the result of an initialize/update operation.
|
|
41
46
|
*
|
|
47
|
+
* `session_expired` - When the current session has expired.
|
|
48
|
+
*
|
|
42
49
|
* `error` - When an unexpected error occurs within the Statsig client.
|
|
43
50
|
*
|
|
44
51
|
* `logs_flushed` - When queued StatsigEvents are flushed to Statsig servers.
|
|
45
52
|
*
|
|
46
53
|
* `pre_shutdown` - Fired just before the SDK is shutdown
|
|
47
54
|
*
|
|
55
|
+
* `initialization_failure` - Fired when the client fails to initialize.
|
|
56
|
+
*
|
|
48
57
|
* `gate_evaluation` - Fired when any gate is checked from the Statsig client.
|
|
49
58
|
*
|
|
50
59
|
* `dynamic_config_evaluation` - Fired when any dyanamic config is checked from the Statsig client.
|
package/src/StatsigMetadata.d.ts
CHANGED
package/src/StatsigMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;
|
|
4
|
-
exports.SDK_VERSION = '3.3.0-beta.
|
|
4
|
+
exports.SDK_VERSION = '3.3.0-beta.3';
|
|
5
5
|
let metadata = {
|
|
6
6
|
sdkVersion: exports.SDK_VERSION,
|
|
7
7
|
sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients
|