@bitfab/sdk 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
@@ -11,7 +11,7 @@ import {
11
11
  getCurrentReplayBranch,
12
12
  getCurrentSpan,
13
13
  getCurrentTrace
14
- } from "./chunk-B4HK3BPE.js";
14
+ } from "./chunk-TJAFKZ4X.js";
15
15
  import {
16
16
  BITFAB_PROGRESS_PREFIX,
17
17
  BitfabError,
@@ -23,7 +23,7 @@ import {
23
23
  flushTraces,
24
24
  reportReplayProgress,
25
25
  serializeReplayResult
26
- } from "./chunk-QUX6N7ON.js";
26
+ } from "./chunk-MBKY42QC.js";
27
27
  export {
28
28
  BITFAB_PROGRESS_PREFIX,
29
29
  Bitfab,
package/dist/node.cjs CHANGED
@@ -88,7 +88,7 @@ var __version__;
88
88
  var init_version_generated = __esm({
89
89
  "src/version.generated.ts"() {
90
90
  "use strict";
91
- __version__ = "0.36.8";
91
+ __version__ = "0.36.9";
92
92
  }
93
93
  });
94
94
 
@@ -2362,6 +2362,7 @@ __export(replay_exports, {
2362
2362
  replay: () => replay,
2363
2363
  reportReplayProgress: () => reportReplayProgress,
2364
2364
  serializeReplayResult: () => serializeReplayResult,
2365
+ sleepForReplayPersistence: () => sleepForReplayPersistence,
2365
2366
  waitForReplayPersistence: () => waitForReplayPersistence
2366
2367
  });
2367
2368
  function dbBranchEnabled(dbBranch) {
@@ -2690,17 +2691,18 @@ async function waitForReplayPersistence(httpClient, testRunId, replayedTraceIds)
2690
2691
  if (Date.now() >= deadline) {
2691
2692
  break;
2692
2693
  }
2693
- await sleep(Math.min(100, Math.max(0, deadline - Date.now())));
2694
+ await sleepForReplayPersistence(
2695
+ Math.min(100, Math.max(0, deadline - Date.now()))
2696
+ );
2694
2697
  }
2695
2698
  const cause = flushed ? "" : " Delivery was also not confirmed before the flush deadline, so the spans likely never reached the server.";
2696
2699
  throw new BitfabError(
2697
2700
  `Replay traces were not fully persisted before the delivery deadline (testRunId ${testRunId}, missing ${missing} of ${Object.keys(expectedSpanCounts).length} trace(s)).${cause}`
2698
2701
  );
2699
2702
  }
2700
- function sleep(ms) {
2703
+ function sleepForReplayPersistence(ms) {
2701
2704
  return new Promise((resolve) => {
2702
- const timer = setTimeout(resolve, ms);
2703
- unrefTimer(timer);
2705
+ setTimeout(resolve, ms);
2704
2706
  });
2705
2707
  }
2706
2708
  async function mapWithConcurrency2(tasks, maxConcurrency, onSettled, onStarted) {
@@ -2979,7 +2981,6 @@ var init_replay = __esm({
2979
2981
  init_randomUuid();
2980
2982
  init_replayContext();
2981
2983
  init_serialize();
2982
- init_unrefTimer();
2983
2984
  REPLAY_PERSISTENCE_TIMEOUT_MS = 3e4;
2984
2985
  BITFAB_PROGRESS_PREFIX = "@@bitfab:progress ";
2985
2986
  ReplayError = class extends BitfabError {