bitfab 0.31.0 → 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
@@ -533,14 +533,15 @@ __export(replay_exports, {
533
533
  replay: () => replay,
534
534
  reportReplayProgress: () => reportReplayProgress
535
535
  });
536
- function resolveDbBranchSettings(dbBranch) {
537
- if (!dbBranch) {
536
+ function resolveDbBranchSettings(environment) {
537
+ if (!environment) {
538
538
  return void 0;
539
539
  }
540
+ const { minCu, maxCu, warmupSql } = environment.dbBranch;
540
541
  const settings = {
541
- ...dbBranch.minCu === void 0 ? {} : { minCu: dbBranch.minCu },
542
- ...dbBranch.maxCu === void 0 ? {} : { maxCu: dbBranch.maxCu },
543
- ...dbBranch.warmupSql === void 0 ? {} : { warmupSql: dbBranch.warmupSql }
542
+ ...minCu === void 0 ? {} : { minCu },
543
+ ...maxCu === void 0 ? {} : { maxCu },
544
+ ...warmupSql === void 0 ? {} : { warmupSql }
544
545
  };
545
546
  return Object.keys(settings).length === 0 ? void 0 : settings;
546
547
  }
@@ -794,7 +795,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
794
795
  options?.experimentGroupId,
795
796
  options?.datasetId,
796
797
  options?.graderIds,
797
- resolveDbBranchSettings(options?.dbBranch)
798
+ resolveDbBranchSettings(options?.environment)
798
799
  );
799
800
  const mockStrategy = options?.mock ?? "marked";
800
801
  const maxConcurrency = options?.maxConcurrency ?? 10;
@@ -981,7 +982,7 @@ __export(index_exports, {
981
982
  module.exports = __toCommonJS(index_exports);
982
983
 
983
984
  // src/version.generated.ts
984
- var __version__ = "0.31.0";
985
+ var __version__ = "0.32.0";
985
986
 
986
987
  // src/constants.ts
987
988
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -3077,6 +3078,9 @@ init_replayContext();
3077
3078
  // src/replayEnvironment.ts
3078
3079
  init_replayContext();
3079
3080
  var ReplayEnvironment = class {
3081
+ constructor(options = {}) {
3082
+ this.dbBranch = { ...options };
3083
+ }
3080
3084
  /**
3081
3085
  * The per-trace branch URL for the item currently being replayed.
3082
3086
  * Throws if read outside a replay item.