@bitfab/sdk 0.61.1 → 0.61.2

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.
@@ -189,7 +189,7 @@ function encodeRequestBody(body) {
189
189
  }
190
190
 
191
191
  // src/version.generated.ts
192
- var __version__ = "0.61.1";
192
+ var __version__ = "0.61.2";
193
193
  var __packageName__ = "@bitfab/sdk";
194
194
 
195
195
  // src/constants.ts
@@ -2681,6 +2681,46 @@ var HttpClient = class {
2681
2681
  }
2682
2682
  return { ...rest, experimentId, experimentUrl };
2683
2683
  }
2684
+ async resumeReplay(experimentId, traceFunctionKey, codeChangeFiles, force) {
2685
+ const payload = {
2686
+ experimentId,
2687
+ traceFunctionKey,
2688
+ lazyDbBranchLease: true
2689
+ };
2690
+ if (force === true) {
2691
+ payload.force = true;
2692
+ }
2693
+ if (codeChangeFiles !== void 0) {
2694
+ payload.codeChangeFiles = codeChangeFiles;
2695
+ }
2696
+ const git = await resolvedGitState();
2697
+ if (git && !isEmptyGitState(git)) {
2698
+ payload.git = git;
2699
+ }
2700
+ const response = await this.request(
2701
+ "/api/sdk/replay/resume",
2702
+ payload,
2703
+ { timeout: REPLAY_DB_BRANCH_REQUEST_TIMEOUT_MS }
2704
+ );
2705
+ const { testRunId, testRunUrl, ...rest } = response;
2706
+ const resumedExperimentId = response.experimentId ?? testRunId;
2707
+ const experimentUrl = response.experimentUrl ?? testRunUrl;
2708
+ if (resumedExperimentId === void 0 || experimentUrl === void 0) {
2709
+ throw new BitfabError(
2710
+ "Replay resume response is missing the experiment ID or URL."
2711
+ );
2712
+ }
2713
+ return {
2714
+ ...rest,
2715
+ experimentId: resumedExperimentId,
2716
+ experimentUrl,
2717
+ work: rest.work ?? [],
2718
+ finished: rest.finished ?? [],
2719
+ skippedOriginalTraceIds: rest.skippedOriginalTraceIds ?? [],
2720
+ includeDbBranchLease: rest.includeDbBranchLease ?? false,
2721
+ dbBranchSettings: rest.dbBranchSettings ?? null
2722
+ };
2723
+ }
2684
2724
  /**
2685
2725
  * Fetch an external span by ID.
2686
2726
  * Blocking GET request.
@@ -2865,4 +2905,4 @@ export {
2865
2905
  HttpClient,
2866
2906
  experimentIdWireFields
2867
2907
  };
2868
- //# sourceMappingURL=chunk-MODZ4MFI.js.map
2908
+ //# sourceMappingURL=chunk-SJPMWVJ3.js.map