@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.
@@ -181,7 +181,7 @@ function encodeRequestBody(body) {
181
181
  }
182
182
 
183
183
  // src/version.generated.ts
184
- var __version__ = "0.61.1";
184
+ var __version__ = "0.61.2";
185
185
  var __packageName__ = "@bitfab/sdk";
186
186
 
187
187
  // src/errors.ts
@@ -2243,6 +2243,46 @@ var HttpClient = class {
2243
2243
  }
2244
2244
  return { ...rest, experimentId, experimentUrl };
2245
2245
  }
2246
+ async resumeReplay(experimentId, traceFunctionKey, codeChangeFiles, force) {
2247
+ const payload = {
2248
+ experimentId,
2249
+ traceFunctionKey,
2250
+ lazyDbBranchLease: true
2251
+ };
2252
+ if (force === true) {
2253
+ payload.force = true;
2254
+ }
2255
+ if (codeChangeFiles !== void 0) {
2256
+ payload.codeChangeFiles = codeChangeFiles;
2257
+ }
2258
+ const git = await resolvedGitState();
2259
+ if (git && !isEmptyGitState(git)) {
2260
+ payload.git = git;
2261
+ }
2262
+ const response = await this.request(
2263
+ "/api/sdk/replay/resume",
2264
+ payload,
2265
+ { timeout: REPLAY_DB_BRANCH_REQUEST_TIMEOUT_MS }
2266
+ );
2267
+ const { testRunId, testRunUrl, ...rest } = response;
2268
+ const resumedExperimentId = response.experimentId ?? testRunId;
2269
+ const experimentUrl = response.experimentUrl ?? testRunUrl;
2270
+ if (resumedExperimentId === void 0 || experimentUrl === void 0) {
2271
+ throw new BitfabError(
2272
+ "Replay resume response is missing the experiment ID or URL."
2273
+ );
2274
+ }
2275
+ return {
2276
+ ...rest,
2277
+ experimentId: resumedExperimentId,
2278
+ experimentUrl,
2279
+ work: rest.work ?? [],
2280
+ finished: rest.finished ?? [],
2281
+ skippedOriginalTraceIds: rest.skippedOriginalTraceIds ?? [],
2282
+ includeDbBranchLease: rest.includeDbBranchLease ?? false,
2283
+ dbBranchSettings: rest.dbBranchSettings ?? null
2284
+ };
2285
+ }
2246
2286
  /**
2247
2287
  * Fetch an external span by ID.
2248
2288
  * Blocking GET request.
@@ -2409,4 +2449,4 @@ export {
2409
2449
  HttpClient,
2410
2450
  experimentIdWireFields
2411
2451
  };
2412
- //# sourceMappingURL=chunk-SVTA5IYD.js.map
2452
+ //# sourceMappingURL=chunk-IR5KCKHF.js.map