@adobe/spacecat-shared-rum-api-client 2.33.1 → 2.34.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v2.34.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.34.0...@adobe/spacecat-shared-rum-api-client-v2.34.1) (2025-07-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add date field to the traffic analysis query ([#870](https://github.com/adobe/spacecat-shared/issues/870)) ([ecbab0c](https://github.com/adobe/spacecat-shared/commit/ecbab0cdbfe2dd740bd29bc76873508715ab52cf))
7
+
8
+ # [@adobe/spacecat-shared-rum-api-client-v2.34.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.33.1...@adobe/spacecat-shared-rum-api-client-v2.34.0) (2025-07-23)
9
+
10
+
11
+ ### Features
12
+
13
+ * **rum-client:** add log checkpoints for around every 50k bundles fetched ([#864](https://github.com/adobe/spacecat-shared/issues/864)) ([23acfc4](https://github.com/adobe/spacecat-shared/commit/23acfc430753371b6440aead135848031874cc68))
14
+
1
15
  # [@adobe/spacecat-shared-rum-api-client-v2.33.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.33.0...@adobe/spacecat-shared-rum-api-client-v2.33.1) (2025-07-19)
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.33.1",
3
+ "version": "2.34.1",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -261,6 +261,7 @@ async function fetchBundles(opts, log) {
261
261
 
262
262
  let totalTransferSize = 0;
263
263
  const failedUrls = [];
264
+ let lastCheckpoint = 0;
264
265
 
265
266
  const result = [];
266
267
  for (const chunk of chunks) {
@@ -291,8 +292,15 @@ async function fetchBundles(opts, log) {
291
292
  .map(filterEvents(checkpoints))
292
293
  .forEach((bundle) => result.push(bundle));
293
294
  });
295
+
296
+ const currentCheckpoint = Math.floor(result.length / 50000);
297
+
298
+ if (currentCheckpoint > lastCheckpoint) {
299
+ log.info(`Checkpoint: Fetched ${result.length} bundles; resuming...`);
300
+ lastCheckpoint = currentCheckpoint;
301
+ }
294
302
  }
295
- log.info(`Retrieved RUM bundles. Total transfer size (in KB): ${(totalTransferSize / 1024).toFixed(2)}`);
303
+ log.info(`Retrieved all RUM bundles. Total transfer size (in KB): ${(totalTransferSize / 1024).toFixed(2)}`);
296
304
 
297
305
  // Add failedUrls to opts object for access by callers
298
306
  if (failedUrls.length > 0) {
@@ -97,7 +97,6 @@ async function handler(bundles) {
97
97
  const memo = {};
98
98
 
99
99
  const result = bundles.map((bundle) => {
100
- /* eslint-disable camelcase */
101
100
  const trafficData = trafficType(bundle, memo);
102
101
  const clicked = getClicked(bundle);
103
102
  const latestScroll = getLatestScroll(bundle);
@@ -121,8 +120,8 @@ async function handler(bundles) {
121
120
  lcp: getCWV(bundle, 'lcp'),
122
121
  inp: getCWV(bundle, 'inp'),
123
122
  cls: getCWV(bundle, 'cls'),
123
+ date: bundle.time.split('T')[0],
124
124
  };
125
- /* eslint-enable camelcase */
126
125
  });
127
126
 
128
127
  return result;