@bitfab/sdk 0.31.1 → 0.32.0

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.cjs CHANGED
@@ -524,14 +524,15 @@ __export(replay_exports, {
524
524
  replay: () => replay,
525
525
  reportReplayProgress: () => reportReplayProgress
526
526
  });
527
- function resolveDbBranchSettings(dbBranch) {
528
- if (!dbBranch) {
527
+ function resolveDbBranchSettings(environment) {
528
+ if (!environment) {
529
529
  return void 0;
530
530
  }
531
+ const { minCu, maxCu, warmupSql } = environment.dbBranch;
531
532
  const settings = {
532
- ...dbBranch.minCu === void 0 ? {} : { minCu: dbBranch.minCu },
533
- ...dbBranch.maxCu === void 0 ? {} : { maxCu: dbBranch.maxCu },
534
- ...dbBranch.warmupSql === void 0 ? {} : { warmupSql: dbBranch.warmupSql }
533
+ ...minCu === void 0 ? {} : { minCu },
534
+ ...maxCu === void 0 ? {} : { maxCu },
535
+ ...warmupSql === void 0 ? {} : { warmupSql }
535
536
  };
536
537
  return Object.keys(settings).length === 0 ? void 0 : settings;
537
538
  }
@@ -785,7 +786,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
785
786
  options?.experimentGroupId,
786
787
  options?.datasetId,
787
788
  options?.graderIds,
788
- resolveDbBranchSettings(options?.dbBranch)
789
+ resolveDbBranchSettings(options?.environment)
789
790
  );
790
791
  const mockStrategy = options?.mock ?? "marked";
791
792
  const maxConcurrency = options?.maxConcurrency ?? 10;
@@ -972,7 +973,7 @@ __export(index_exports, {
972
973
  module.exports = __toCommonJS(index_exports);
973
974
 
974
975
  // src/version.generated.ts
975
- var __version__ = "0.31.1";
976
+ var __version__ = "0.32.0";
976
977
 
977
978
  // src/constants.ts
978
979
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -3068,6 +3069,9 @@ init_replayContext();
3068
3069
  // src/replayEnvironment.ts
3069
3070
  init_replayContext();
3070
3071
  var ReplayEnvironment = class {
3072
+ constructor(options = {}) {
3073
+ this.dbBranch = { ...options };
3074
+ }
3071
3075
  /**
3072
3076
  * The per-trace branch URL for the item currently being replayed.
3073
3077
  * Throws if read outside a replay item.