@bitfab/sdk 0.50.0 → 0.51.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-W5P5JAH7.js → chunk-4CLJF2DZ.js} +9 -5
- package/dist/{chunk-W5P5JAH7.js.map → chunk-4CLJF2DZ.js.map} +1 -1
- package/dist/{chunk-6LG3OFIX.js → chunk-DNYZJLNY.js} +23 -5
- package/dist/chunk-DNYZJLNY.js.map +1 -0
- package/dist/{chunk-XZDYNFI5.js → chunk-RGC7IEOI.js} +9 -5
- package/dist/{chunk-XZDYNFI5.js.map → chunk-RGC7IEOI.js.map} +1 -1
- package/dist/{chunk-BT4RNCQL.js → chunk-VXD27AJ3.js} +6 -6
- package/dist/{chunk-BT4RNCQL.js.map → chunk-VXD27AJ3.js.map} +1 -1
- package/dist/{http-W2YPLY7H.js → http-AKFJONE7.js} +2 -2
- package/dist/{http-PFP2EQVE.js → http-HLRWCSFF.js} +2 -2
- package/dist/index.cjs +29 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -8
- package/dist/index.d.ts +12 -8
- package/dist/index.js +3 -3
- package/dist/node.cjs +29 -7
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-AFX7ENZI.js → replay-ISXRCXUP.js} +3 -3
- package/dist/replayCli.js +40 -14
- package/dist/replayCli.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6LG3OFIX.js.map +0 -1
- /package/dist/{http-PFP2EQVE.js.map → http-AKFJONE7.js.map} +0 -0
- /package/dist/{http-W2YPLY7H.js.map → http-HLRWCSFF.js.map} +0 -0
- /package/dist/{replay-AFX7ENZI.js.map → replay-ISXRCXUP.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4CLJF2DZ.js";
|
|
10
10
|
export {
|
|
11
11
|
BitfabError,
|
|
12
12
|
HttpClient,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
parseRetryAfterMs,
|
|
17
17
|
serializePayloadBody
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=http-
|
|
19
|
+
//# sourceMappingURL=http-AKFJONE7.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
flushTraces,
|
|
7
7
|
parseRetryAfterMs,
|
|
8
8
|
serializePayloadBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RGC7IEOI.js";
|
|
10
10
|
import "./chunk-H6LZRFMN.js";
|
|
11
11
|
export {
|
|
12
12
|
BitfabError,
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
parseRetryAfterMs,
|
|
18
18
|
serializePayloadBody
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=http-
|
|
20
|
+
//# sourceMappingURL=http-HLRWCSFF.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var __version__, __packageName__;
|
|
|
42
42
|
var init_version_generated = __esm({
|
|
43
43
|
"src/version.generated.ts"() {
|
|
44
44
|
"use strict";
|
|
45
|
-
__version__ = "0.
|
|
45
|
+
__version__ = "0.51.0";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -1847,7 +1847,7 @@ var init_http = __esm({
|
|
|
1847
1847
|
* Start a replay session by fetching historical traces.
|
|
1848
1848
|
* Blocking call - creates a test run and returns lightweight item references.
|
|
1849
1849
|
*/
|
|
1850
|
-
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId,
|
|
1850
|
+
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions) {
|
|
1851
1851
|
const payload = { traceFunctionKey };
|
|
1852
1852
|
if (limit !== void 0) {
|
|
1853
1853
|
payload.limit = limit;
|
|
@@ -1871,8 +1871,12 @@ var init_http = __esm({
|
|
|
1871
1871
|
if (experimentGroupId !== void 0) {
|
|
1872
1872
|
payload.experimentGroupId = experimentGroupId;
|
|
1873
1873
|
}
|
|
1874
|
-
if (
|
|
1875
|
-
|
|
1874
|
+
if (datasetIds !== void 0) {
|
|
1875
|
+
if (datasetIds.length === 1) {
|
|
1876
|
+
payload.datasetId = datasetIds[0];
|
|
1877
|
+
} else {
|
|
1878
|
+
payload.datasetIds = datasetIds;
|
|
1879
|
+
}
|
|
1876
1880
|
}
|
|
1877
1881
|
if (graderIds !== void 0) {
|
|
1878
1882
|
payload.graderIds = graderIds;
|
|
@@ -2474,6 +2478,23 @@ function resolveAttempts(attempts) {
|
|
|
2474
2478
|
}
|
|
2475
2479
|
return attempts;
|
|
2476
2480
|
}
|
|
2481
|
+
function resolveDatasetIds(options) {
|
|
2482
|
+
if (options?.datasetId !== void 0 && options?.datasetIds !== void 0) {
|
|
2483
|
+
throw new BitfabError(
|
|
2484
|
+
"datasetId and datasetIds are the same selector: pass one dataset through datasetId, or several through datasetIds."
|
|
2485
|
+
);
|
|
2486
|
+
}
|
|
2487
|
+
if (options?.datasetId !== void 0) {
|
|
2488
|
+
return [options.datasetId];
|
|
2489
|
+
}
|
|
2490
|
+
if (options?.datasetIds === void 0) {
|
|
2491
|
+
return void 0;
|
|
2492
|
+
}
|
|
2493
|
+
if (options.datasetIds.length === 0) {
|
|
2494
|
+
throw new BitfabError("datasetIds must contain at least one dataset ID.");
|
|
2495
|
+
}
|
|
2496
|
+
return [...new Set(options.datasetIds)];
|
|
2497
|
+
}
|
|
2477
2498
|
function dbBranchEnabled(dbBranch) {
|
|
2478
2499
|
return dbBranch !== void 0 && dbBranch !== false;
|
|
2479
2500
|
}
|
|
@@ -2906,9 +2927,10 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
2906
2927
|
);
|
|
2907
2928
|
}
|
|
2908
2929
|
}
|
|
2909
|
-
|
|
2930
|
+
const datasetIds = resolveDatasetIds(options);
|
|
2931
|
+
if (options?.traceIds !== void 0 && datasetIds !== void 0) {
|
|
2910
2932
|
throw new BitfabError(
|
|
2911
|
-
"traceIds and
|
|
2933
|
+
"traceIds and datasetIds select different replay sources and cannot be used together."
|
|
2912
2934
|
);
|
|
2913
2935
|
}
|
|
2914
2936
|
if (options?.limit !== void 0 && options?.traceIds !== void 0) {
|
|
@@ -2950,7 +2972,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
2950
2972
|
// before it could report its resolved inputs.
|
|
2951
2973
|
dbBranchEnabled(options?.dbBranch) && options?.dryRun !== true,
|
|
2952
2974
|
options?.experimentGroupId,
|
|
2953
|
-
|
|
2975
|
+
datasetIds,
|
|
2954
2976
|
options?.graderIds,
|
|
2955
2977
|
resolveDbBranchSettings(options?.dbBranch),
|
|
2956
2978
|
attempts,
|