bitfab 0.36.8 → 0.36.9

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.d.cts CHANGED
@@ -2557,7 +2557,7 @@ declare class BitfabFunction {
2557
2557
  /**
2558
2558
  * SDK version from package.json (injected at build time)
2559
2559
  */
2560
- declare const __version__ = "0.36.8";
2560
+ declare const __version__ = "0.36.9";
2561
2561
 
2562
2562
  /**
2563
2563
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -2557,7 +2557,7 @@ declare class BitfabFunction {
2557
2557
  /**
2558
2558
  * SDK version from package.json (injected at build time)
2559
2559
  */
2560
- declare const __version__ = "0.36.8";
2560
+ declare const __version__ = "0.36.9";
2561
2561
 
2562
2562
  /**
2563
2563
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  getCurrentReplayBranch,
21
21
  getCurrentSpan,
22
22
  getCurrentTrace
23
- } from "./chunk-B4HK3BPE.js";
23
+ } from "./chunk-TJAFKZ4X.js";
24
24
  import {
25
25
  BITFAB_PROGRESS_PREFIX,
26
26
  BitfabError,
@@ -32,7 +32,7 @@ import {
32
32
  flushTraces,
33
33
  reportReplayProgress,
34
34
  serializeReplayResult
35
- } from "./chunk-QUX6N7ON.js";
35
+ } from "./chunk-MBKY42QC.js";
36
36
  export {
37
37
  BITFAB_PROGRESS_PREFIX,
38
38
  Bitfab,
package/dist/node.cjs CHANGED
@@ -97,7 +97,7 @@ var __version__;
97
97
  var init_version_generated = __esm({
98
98
  "src/version.generated.ts"() {
99
99
  "use strict";
100
- __version__ = "0.36.8";
100
+ __version__ = "0.36.9";
101
101
  }
102
102
  });
103
103
 
@@ -2371,6 +2371,7 @@ __export(replay_exports, {
2371
2371
  replay: () => replay,
2372
2372
  reportReplayProgress: () => reportReplayProgress,
2373
2373
  serializeReplayResult: () => serializeReplayResult,
2374
+ sleepForReplayPersistence: () => sleepForReplayPersistence,
2374
2375
  waitForReplayPersistence: () => waitForReplayPersistence
2375
2376
  });
2376
2377
  function dbBranchEnabled(dbBranch) {
@@ -2699,17 +2700,18 @@ async function waitForReplayPersistence(httpClient, testRunId, replayedTraceIds)
2699
2700
  if (Date.now() >= deadline) {
2700
2701
  break;
2701
2702
  }
2702
- await sleep(Math.min(100, Math.max(0, deadline - Date.now())));
2703
+ await sleepForReplayPersistence(
2704
+ Math.min(100, Math.max(0, deadline - Date.now()))
2705
+ );
2703
2706
  }
2704
2707
  const cause = flushed ? "" : " Delivery was also not confirmed before the flush deadline, so the spans likely never reached the server.";
2705
2708
  throw new BitfabError(
2706
2709
  `Replay traces were not fully persisted before the delivery deadline (testRunId ${testRunId}, missing ${missing} of ${Object.keys(expectedSpanCounts).length} trace(s)).${cause}`
2707
2710
  );
2708
2711
  }
2709
- function sleep(ms) {
2712
+ function sleepForReplayPersistence(ms) {
2710
2713
  return new Promise((resolve) => {
2711
- const timer = setTimeout(resolve, ms);
2712
- unrefTimer(timer);
2714
+ setTimeout(resolve, ms);
2713
2715
  });
2714
2716
  }
2715
2717
  async function mapWithConcurrency2(tasks, maxConcurrency, onSettled, onStarted) {
@@ -2988,7 +2990,6 @@ var init_replay = __esm({
2988
2990
  init_randomUuid();
2989
2991
  init_replayContext();
2990
2992
  init_serialize();
2991
- init_unrefTimer();
2992
2993
  REPLAY_PERSISTENCE_TIMEOUT_MS = 3e4;
2993
2994
  BITFAB_PROGRESS_PREFIX = "@@bitfab:progress ";
2994
2995
  ReplayError = class extends BitfabError {