@statsig/client-core 1.8.0-beta.14 → 1.8.0-beta.15
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 +16 -1
- package/src/StatsigMetadata.d.ts +1 -1
- package/src/StatsigMetadata.js +1 -1
package/package.json
CHANGED
package/src/NetworkCore.js
CHANGED
|
@@ -76,6 +76,21 @@ class NetworkCore {
|
|
|
76
76
|
const body = yield this._getPopulatedBody(Object.assign(Object.assign({}, args), networkProxyArgs));
|
|
77
77
|
const url = yield this._getPopulatedURL(Object.assign(Object.assign({}, args), networkProxyArgs));
|
|
78
78
|
const nav = navigator;
|
|
79
|
+
const isProxy = !url.includes('https://statsigapi.net/v1');
|
|
80
|
+
const parsedUrl = new URL(url);
|
|
81
|
+
const endpoint = parsedUrl.pathname;
|
|
82
|
+
if (!url.includes('https://prodregistryv2.org')) {
|
|
83
|
+
this.networkEvents.push({
|
|
84
|
+
value: isProxy ? 'proxy' : 'statsig',
|
|
85
|
+
eventName: 'proxy::network_request_tracking',
|
|
86
|
+
metadata: {
|
|
87
|
+
url,
|
|
88
|
+
endpoint,
|
|
89
|
+
},
|
|
90
|
+
time: Date.now(),
|
|
91
|
+
user: null,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
79
94
|
return nav.sendBeacon.bind(nav)(url, body);
|
|
80
95
|
});
|
|
81
96
|
}
|
|
@@ -229,7 +244,7 @@ class NetworkCore {
|
|
|
229
244
|
_startBackgroundFlushNetworkEvents() {
|
|
230
245
|
setInterval(() => {
|
|
231
246
|
this._flushNetworkEvents();
|
|
232
|
-
},
|
|
247
|
+
}, 60000);
|
|
233
248
|
}
|
|
234
249
|
}
|
|
235
250
|
exports.NetworkCore = NetworkCore;
|
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.15';
|
|
5
5
|
let metadata = {
|
|
6
6
|
sdkVersion: exports.SDK_VERSION,
|
|
7
7
|
sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients
|