@adobe/spacecat-shared-rum-api-client 2.38.5 → 2.38.7

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,22 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v2.38.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.38.6...@adobe/spacecat-shared-rum-api-client-v2.38.7) (2025-10-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **traffic-attribution:** handle direct referrers from rum-distiller ([#1061](https://github.com/adobe/spacecat-shared/issues/1061)) ([99b1262](https://github.com/adobe/spacecat-shared/commit/99b1262638c978579770f63715ed1dd5090bffa4))
7
+
8
+
9
+ ### Reverts
10
+
11
+ * Revert "fix(traffic-attribution): handle non standard referrers ([#1040](https://github.com/adobe/spacecat-shared/issues/1040))" ([3686145](https://github.com/adobe/spacecat-shared/commit/3686145d16b0cc39d0da88c0bd2ca10dc249f93c))
12
+
13
+ # [@adobe/spacecat-shared-rum-api-client-v2.38.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.38.5...@adobe/spacecat-shared-rum-api-client-v2.38.6) (2025-10-28)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * remove cyclic deps in shared ([#1053](https://github.com/adobe/spacecat-shared/issues/1053)) ([acbbc93](https://github.com/adobe/spacecat-shared/commit/acbbc93f8c961fdef55edb5e7947958456538586))
19
+
1
20
  # [@adobe/spacecat-shared-rum-api-client-v2.38.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.38.4...@adobe/spacecat-shared-rum-api-client-v2.38.5) (2025-10-28)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-rum-api-client",
3
- "version": "2.38.5",
3
+ "version": "2.38.7",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -39,7 +39,7 @@
39
39
  "@adobe/helix-shared-wrap": "2.0.2",
40
40
  "@adobe/helix-universal": "5.2.3",
41
41
  "@adobe/rum-distiller": "1.20.8",
42
- "@adobe/spacecat-shared-utils": "1.48.0",
42
+ "@adobe/spacecat-shared-utils": "1.66.0",
43
43
  "aws4": "1.13.2",
44
44
  "urijs": "1.19.11"
45
45
  },
@@ -26,9 +26,17 @@ import URI from 'urijs';
26
26
  */
27
27
  export function getSecondLevelDomain(url) {
28
28
  if (!hasText(url)) return url;
29
- const uri = new URI(prependSchema(url));
30
- const tld = uri.tld();
31
- return uri.hostname().split(`.${tld}`)[0];
29
+ if (url === '(direct)') return '';
30
+
31
+ try {
32
+ const uri = new URI(prependSchema(url));
33
+ const tld = uri.tld();
34
+ return uri.hostname().split(`.${tld}`)[0];
35
+ /* c8 ignore next 4 */
36
+ } catch (error) {
37
+ // future-proof for the cases where url cannot be parsed for some reason
38
+ return url;
39
+ }
32
40
  }
33
41
 
34
42
  /*