@statsig/client-core 1.8.0-beta.11 → 1.8.0-beta.12
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 +1 -1
- package/src/NetworkCore.js +5 -0
- package/src/StatsigMetadata.d.ts +1 -1
- package/src/StatsigMetadata.js +1 -1
package/package.json
CHANGED
package/src/NetworkCore.js
CHANGED
|
@@ -95,12 +95,15 @@ class NetworkCore {
|
|
|
95
95
|
controller === null || controller === void 0 ? void 0 : controller.abort(`Timeout of ${this._timeout}ms expired.`);
|
|
96
96
|
}, this._timeout);
|
|
97
97
|
const proxyUrl = (_a = args.proxyUrl) !== null && _a !== void 0 ? _a : this._proxy.getProxyUrl(args.sdkKey, args.url);
|
|
98
|
+
console.log('1');
|
|
98
99
|
const url = yield this._getPopulatedURL(Object.assign({ proxyUrl }, args));
|
|
100
|
+
console.log('2');
|
|
99
101
|
const isProxy = !url.includes('https://statsigapi.net/v1');
|
|
100
102
|
const parsedUrl = new URL(url);
|
|
101
103
|
const endpoint = parsedUrl.pathname;
|
|
102
104
|
let response = null;
|
|
103
105
|
const keepalive = (0, VisibilityObserving_1._isUnloading)();
|
|
106
|
+
console.log('3');
|
|
104
107
|
try {
|
|
105
108
|
const config = {
|
|
106
109
|
method,
|
|
@@ -110,6 +113,7 @@ class NetworkCore {
|
|
|
110
113
|
priority: args.priority,
|
|
111
114
|
keepalive,
|
|
112
115
|
};
|
|
116
|
+
console.log('3');
|
|
113
117
|
if (args.isInitialize) {
|
|
114
118
|
Diagnostics_1.Diagnostics._markInitNetworkReqStart(args.sdkKey, {
|
|
115
119
|
attempt: currentAttempt,
|
|
@@ -118,6 +122,7 @@ class NetworkCore {
|
|
|
118
122
|
const func = (_b = this._netConfig.networkOverrideFunc) !== null && _b !== void 0 ? _b : fetch;
|
|
119
123
|
response = yield func(url, config);
|
|
120
124
|
clearTimeout(handle);
|
|
125
|
+
console.log('4');
|
|
121
126
|
if (!response.ok) {
|
|
122
127
|
const text = yield response.text().catch(() => 'No Text');
|
|
123
128
|
const err = new Error(`NetworkError: ${url} ${text}`);
|
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 = '1.8.0-beta.
|
|
4
|
+
exports.SDK_VERSION = '1.8.0-beta.12';
|
|
5
5
|
let metadata = {
|
|
6
6
|
sdkVersion: exports.SDK_VERSION,
|
|
7
7
|
sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients
|