@nexushub/client 0.3.2 → 0.3.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/dist/index.cjs +7 -4
- package/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1364,10 +1364,13 @@ var VitalsCollector = class {
|
|
|
1364
1364
|
if (resourceEntries.length > 0) {
|
|
1365
1365
|
this.metrics.resources = resourceEntries.filter((r) => !r.name.includes("/api/collect")).sort((a, b) => b.duration - a.duration).slice(0, 20).map((r) => ({
|
|
1366
1366
|
name: r.name,
|
|
1367
|
-
|
|
1367
|
+
initiatorType: r.initiatorType,
|
|
1368
1368
|
duration: Math.round(r.duration),
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
transferSize: r.transferSize > 0 ? r.transferSize : void 0,
|
|
1370
|
+
encodedBodySize: r.encodedBodySize > 0 ? r.encodedBodySize : void 0,
|
|
1371
|
+
decodedBodySize: r.decodedBodySize > 0 ? r.decodedBodySize : void 0,
|
|
1372
|
+
startTime: Math.round(r.startTime),
|
|
1373
|
+
responseEnd: Math.round(r.responseEnd)
|
|
1371
1374
|
}));
|
|
1372
1375
|
this.hasUpdates = true;
|
|
1373
1376
|
}
|
|
@@ -1809,7 +1812,7 @@ var AnalyticsEngine = class {
|
|
|
1809
1812
|
for (const threshold of THRESHOLDS) {
|
|
1810
1813
|
if (this.maxScrollDepth >= threshold && !this.scrollThresholdsFired.has(threshold)) {
|
|
1811
1814
|
this.scrollThresholdsFired.add(threshold);
|
|
1812
|
-
this.tracker.send("
|
|
1815
|
+
this.tracker.send("scroll", {
|
|
1813
1816
|
depth: threshold / 100,
|
|
1814
1817
|
depth_percent: threshold,
|
|
1815
1818
|
path: window.location.pathname
|
package/dist/index.js
CHANGED
|
@@ -1364,10 +1364,13 @@ var VitalsCollector = class {
|
|
|
1364
1364
|
if (resourceEntries.length > 0) {
|
|
1365
1365
|
this.metrics.resources = resourceEntries.filter((r) => !r.name.includes("/api/collect")).sort((a, b) => b.duration - a.duration).slice(0, 20).map((r) => ({
|
|
1366
1366
|
name: r.name,
|
|
1367
|
-
|
|
1367
|
+
initiatorType: r.initiatorType,
|
|
1368
1368
|
duration: Math.round(r.duration),
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
transferSize: r.transferSize > 0 ? r.transferSize : void 0,
|
|
1370
|
+
encodedBodySize: r.encodedBodySize > 0 ? r.encodedBodySize : void 0,
|
|
1371
|
+
decodedBodySize: r.decodedBodySize > 0 ? r.decodedBodySize : void 0,
|
|
1372
|
+
startTime: Math.round(r.startTime),
|
|
1373
|
+
responseEnd: Math.round(r.responseEnd)
|
|
1371
1374
|
}));
|
|
1372
1375
|
this.hasUpdates = true;
|
|
1373
1376
|
}
|
|
@@ -1809,7 +1812,7 @@ var AnalyticsEngine = class {
|
|
|
1809
1812
|
for (const threshold of THRESHOLDS) {
|
|
1810
1813
|
if (this.maxScrollDepth >= threshold && !this.scrollThresholdsFired.has(threshold)) {
|
|
1811
1814
|
this.scrollThresholdsFired.add(threshold);
|
|
1812
|
-
this.tracker.send("
|
|
1815
|
+
this.tracker.send("scroll", {
|
|
1813
1816
|
depth: threshold / 100,
|
|
1814
1817
|
depth_percent: threshold,
|
|
1815
1818
|
path: window.location.pathname
|