@adobe/spacecat-shared-rum-api-client 2.37.2 → 2.37.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v2.37.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.37.3...@adobe/spacecat-shared-rum-api-client-v2.37.4) (2025-09-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/rum-distiller to v1.19.0 ([#958](https://github.com/adobe/spacecat-shared/issues/958)) ([53b4f1f](https://github.com/adobe/spacecat-shared/commit/53b4f1f85f8dd9aaf310eb5308e9f0ebe2a0a75d)), closes [#8203](https://github.com/adobe/spacecat-shared/issues/8203)
7
+
8
+ # [@adobe/spacecat-shared-rum-api-client-v2.37.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.37.2...@adobe/spacecat-shared-rum-api-client-v2.37.3) (2025-09-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * filtering and keeping top 5 form internal navigation to reduce a… ([#954](https://github.com/adobe/spacecat-shared/issues/954)) ([bb53e01](https://github.com/adobe/spacecat-shared/commit/bb53e01c7f8776de2f7c1b0465a95c9fed289305))
14
+
1
15
  # [@adobe/spacecat-shared-rum-api-client-v2.37.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.37.1...@adobe/spacecat-shared-rum-api-client-v2.37.2) (2025-09-09)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-rum-api-client",
3
- "version": "2.37.2",
3
+ "version": "2.37.4",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -38,7 +38,7 @@
38
38
  "@adobe/fetch": "4.2.2",
39
39
  "@adobe/helix-shared-wrap": "2.0.2",
40
40
  "@adobe/helix-universal": "5.2.2",
41
- "@adobe/rum-distiller": "1.17.0",
41
+ "@adobe/rum-distiller": "1.19.0",
42
42
  "@adobe/spacecat-shared-utils": "1.48.0",
43
43
  "aws4": "1.13.2",
44
44
  "urijs": "1.19.11"
@@ -295,6 +295,7 @@ function handler(bundles) {
295
295
 
296
296
  // populate internal navigation data
297
297
  populateFormsInternalNavigation(bundles, formVitals);
298
+
298
299
  // filter out pages with no form vitals
299
300
  const filteredFormVitals = Object.values(formVitals).filter(
300
301
  (formVital) => containsFormVitals(formVital) && !isUnderExperiment(formVital, experimentUrls),
@@ -322,6 +323,22 @@ function handler(bundles) {
322
323
  return formVitalCopy;
323
324
  });
324
325
 
326
+ // keeping on top 5 by page views count internal navigation
327
+ Object.values(updatedFormVitals).forEach((item) => {
328
+ if (item.forminternalnavigation) {
329
+ item.forminternalnavigation.sort((a, b) => {
330
+ // eslint-disable-next-line max-len
331
+ const sumA = a.pageview ? Object.values(a.pageview).reduce((sum, val) => sum + (val || 0), 0) : 0;
332
+ // eslint-disable-next-line max-len
333
+ const sumB = b.pageview ? Object.values(b.pageview).reduce((sum, val) => sum + (val || 0), 0) : 0;
334
+ return sumB - sumA;
335
+ });
336
+
337
+ // eslint-disable-next-line no-param-reassign
338
+ item.forminternalnavigation = item.forminternalnavigation.slice(0, 5);
339
+ }
340
+ });
341
+
325
342
  return [...updatedFormVitals];
326
343
  }
327
344