@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.
@@ -16,7 +16,7 @@ import {
16
16
  toJsonSafe,
17
17
  toJsonSafeReport,
18
18
  warnOnce
19
- } from "./chunk-QUX6N7ON.js";
19
+ } from "./chunk-MBKY42QC.js";
20
20
 
21
21
  // src/processorPayload.ts
22
22
  var SERIALIZATION_DEGRADED_STEP = "serialization_degraded";
@@ -3371,7 +3371,7 @@ var Bitfab = class {
3371
3371
  `Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
3372
3372
  );
3373
3373
  }
3374
- const { replay: doReplay } = await import("./replay-7PUB6ZOG.js");
3374
+ const { replay: doReplay } = await import("./replay-MH5QFXET.js");
3375
3375
  return doReplay(
3376
3376
  this.httpClient,
3377
3377
  this.serviceUrl,
@@ -3609,4 +3609,4 @@ export {
3609
3609
  BitfabFunction,
3610
3610
  finalizers
3611
3611
  };
3612
- //# sourceMappingURL=chunk-B4HK3BPE.js.map
3612
+ //# sourceMappingURL=chunk-TJAFKZ4X.js.map
package/dist/index.cjs CHANGED
@@ -42,7 +42,7 @@ var __version__;
42
42
  var init_version_generated = __esm({
43
43
  "src/version.generated.ts"() {
44
44
  "use strict";
45
- __version__ = "0.36.8";
45
+ __version__ = "0.36.9";
46
46
  }
47
47
  });
48
48
 
@@ -2355,6 +2355,7 @@ __export(replay_exports, {
2355
2355
  replay: () => replay,
2356
2356
  reportReplayProgress: () => reportReplayProgress,
2357
2357
  serializeReplayResult: () => serializeReplayResult,
2358
+ sleepForReplayPersistence: () => sleepForReplayPersistence,
2358
2359
  waitForReplayPersistence: () => waitForReplayPersistence
2359
2360
  });
2360
2361
  function dbBranchEnabled(dbBranch) {
@@ -2683,17 +2684,18 @@ async function waitForReplayPersistence(httpClient, testRunId, replayedTraceIds)
2683
2684
  if (Date.now() >= deadline) {
2684
2685
  break;
2685
2686
  }
2686
- await sleep(Math.min(100, Math.max(0, deadline - Date.now())));
2687
+ await sleepForReplayPersistence(
2688
+ Math.min(100, Math.max(0, deadline - Date.now()))
2689
+ );
2687
2690
  }
2688
2691
  const cause = flushed ? "" : " Delivery was also not confirmed before the flush deadline, so the spans likely never reached the server.";
2689
2692
  throw new BitfabError(
2690
2693
  `Replay traces were not fully persisted before the delivery deadline (testRunId ${testRunId}, missing ${missing} of ${Object.keys(expectedSpanCounts).length} trace(s)).${cause}`
2691
2694
  );
2692
2695
  }
2693
- function sleep(ms) {
2696
+ function sleepForReplayPersistence(ms) {
2694
2697
  return new Promise((resolve) => {
2695
- const timer = setTimeout(resolve, ms);
2696
- unrefTimer(timer);
2698
+ setTimeout(resolve, ms);
2697
2699
  });
2698
2700
  }
2699
2701
  async function mapWithConcurrency2(tasks, maxConcurrency, onSettled, onStarted) {
@@ -2972,7 +2974,6 @@ var init_replay = __esm({
2972
2974
  init_randomUuid();
2973
2975
  init_replayContext();
2974
2976
  init_serialize();
2975
- init_unrefTimer();
2976
2977
  REPLAY_PERSISTENCE_TIMEOUT_MS = 3e4;
2977
2978
  BITFAB_PROGRESS_PREFIX = "@@bitfab:progress ";
2978
2979
  ReplayError = class extends BitfabError {