@bitfab/sdk 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/{chunk-6UJ3E3H5.js → chunk-NMNVPON4.js} +8 -7
- package/dist/{chunk-6UJ3E3H5.js.map → chunk-NMNVPON4.js.map} +1 -1
- package/dist/{chunk-A7K5JOBV.js → chunk-YZZO475T.js} +7 -4
- package/dist/chunk-YZZO475T.js.map +1 -0
- package/dist/index.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -31
- package/dist/index.d.ts +42 -31
- package/dist/index.js +2 -2
- package/dist/node.cjs +11 -7
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-JVURNX5Y.js → replay-DJWVOJUR.js} +2 -2
- package/package.json +5 -4
- package/dist/chunk-A7K5JOBV.js.map +0 -1
- /package/dist/{replay-JVURNX5Y.js.map → replay-DJWVOJUR.js.map} +0 -0
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(
|
|
528
|
-
if (!
|
|
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
|
-
...
|
|
533
|
-
...
|
|
534
|
-
...
|
|
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?.
|
|
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.
|
|
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.
|