@shipeasy/sdk 2.5.0 → 2.5.1
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/dist/client/index.js +2 -1
- package/dist/client/index.mjs +2 -1
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -143,7 +143,8 @@ var EventBuffer = class {
|
|
|
143
143
|
const batch = this.queue.splice(0);
|
|
144
144
|
const body = JSON.stringify({ events: batch });
|
|
145
145
|
if (useBeacon && typeof navigator !== "undefined" && navigator.sendBeacon) {
|
|
146
|
-
|
|
146
|
+
const beaconBody = JSON.stringify({ k: this.sdkKey, events: batch });
|
|
147
|
+
navigator.sendBeacon(this.collectUrl, new Blob([beaconBody], { type: "text/plain" }));
|
|
147
148
|
return;
|
|
148
149
|
}
|
|
149
150
|
fetch(this.collectUrl, {
|
package/dist/client/index.mjs
CHANGED
|
@@ -100,7 +100,8 @@ var EventBuffer = class {
|
|
|
100
100
|
const batch = this.queue.splice(0);
|
|
101
101
|
const body = JSON.stringify({ events: batch });
|
|
102
102
|
if (useBeacon && typeof navigator !== "undefined" && navigator.sendBeacon) {
|
|
103
|
-
|
|
103
|
+
const beaconBody = JSON.stringify({ k: this.sdkKey, events: batch });
|
|
104
|
+
navigator.sendBeacon(this.collectUrl, new Blob([beaconBody], { type: "text/plain" }));
|
|
104
105
|
return;
|
|
105
106
|
}
|
|
106
107
|
fetch(this.collectUrl, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipeasy/sdk",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Shipeasy SDK — feature gates, runtime configs, experiments, and metrics for the Shipeasy hosted service.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://shipeasy.ai",
|