@bitfab/sdk 0.65.3 → 0.65.4
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-CLP2L5PU.js → chunk-27B3UBSS.js} +2 -2
- package/dist/{chunk-CLP2L5PU.js.map → chunk-27B3UBSS.js.map} +1 -1
- package/dist/{chunk-Z26K57WZ.js → chunk-B2M4KELA.js} +2 -2
- package/dist/{chunk-LCV2JYXL.js → chunk-I233ERUH.js} +2 -2
- package/dist/{chunk-LCV2JYXL.js.map → chunk-I233ERUH.js.map} +1 -1
- package/dist/{chunk-NRE5CJPR.js → chunk-ISU6FQKY.js} +33 -30
- package/dist/chunk-ISU6FQKY.js.map +1 -0
- package/dist/{chunk-BRMGNMDO.js → chunk-R6M54SPO.js} +4 -4
- package/dist/{chunk-HLH7TN2A.js → chunk-SOP5AFMH.js} +2 -2
- package/dist/{http-VN52X47M.js → http-LL3JD2JE.js} +2 -2
- package/dist/{http-WP4YPPKC.js → http-QZDTQC3C.js} +2 -2
- package/dist/index.cjs +28 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +3 -3
- package/dist/node.cjs +28 -25
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-OT4A4HVF.js → replay-636XZIS2.js} +3 -3
- package/dist/{replay-463SEV53.js → replay-S4DNF4VR.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-NRE5CJPR.js.map +0 -1
- /package/dist/{chunk-Z26K57WZ.js.map → chunk-B2M4KELA.js.map} +0 -0
- /package/dist/{chunk-BRMGNMDO.js.map → chunk-R6M54SPO.js.map} +0 -0
- /package/dist/{chunk-HLH7TN2A.js.map → chunk-SOP5AFMH.js.map} +0 -0
- /package/dist/{http-VN52X47M.js.map → http-LL3JD2JE.js.map} +0 -0
- /package/dist/{http-WP4YPPKC.js.map → http-QZDTQC3C.js.map} +0 -0
- /package/dist/{replay-463SEV53.js.map → replay-636XZIS2.js.map} +0 -0
- /package/dist/{replay-OT4A4HVF.js.map → replay-S4DNF4VR.js.map} +0 -0
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
serializeReplayResult,
|
|
7
7
|
warnJudgeAssertionsDeprecated,
|
|
8
8
|
withCliFlags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B2M4KELA.js";
|
|
10
10
|
import {
|
|
11
11
|
BitfabError,
|
|
12
12
|
asyncStorageReady,
|
|
13
13
|
createAsyncLocalStorage,
|
|
14
14
|
warnOnce
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-27B3UBSS.js";
|
|
16
16
|
|
|
17
17
|
// src/autoTrace.ts
|
|
18
18
|
var autoTraceGlobal = globalThis;
|
|
@@ -458,7 +458,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
458
458
|
sessionId: seedCase.sessionId
|
|
459
459
|
})
|
|
460
460
|
);
|
|
461
|
-
const { flushTraces } = await import("./http-
|
|
461
|
+
const { flushTraces } = await import("./http-QZDTQC3C.js");
|
|
462
462
|
await flushTraces(3e4);
|
|
463
463
|
return { pipeline, traceFunctionKey, traceIds };
|
|
464
464
|
}
|
|
@@ -1173,4 +1173,4 @@ export {
|
|
|
1173
1173
|
runRegistryMain,
|
|
1174
1174
|
runIfEntrypoint
|
|
1175
1175
|
};
|
|
1176
|
-
//# sourceMappingURL=chunk-
|
|
1176
|
+
//# sourceMappingURL=chunk-R6M54SPO.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
replayContextReady,
|
|
9
9
|
runWithReplayContext,
|
|
10
10
|
unrefTimer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I233ERUH.js";
|
|
12
12
|
import {
|
|
13
13
|
runWithCaptureSuppressed,
|
|
14
14
|
warnOnce,
|
|
@@ -2057,4 +2057,4 @@ export {
|
|
|
2057
2057
|
warnJudgeAssertionsDeprecated,
|
|
2058
2058
|
replay
|
|
2059
2059
|
};
|
|
2060
|
-
//# sourceMappingURL=chunk-
|
|
2060
|
+
//# sourceMappingURL=chunk-SOP5AFMH.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
flushTraces,
|
|
9
9
|
parseRetryAfterMs,
|
|
10
10
|
serializePayloadBody
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I233ERUH.js";
|
|
12
12
|
import "./chunk-MT36GJMW.js";
|
|
13
13
|
export {
|
|
14
14
|
BitfabError,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
parseRetryAfterMs,
|
|
22
22
|
serializePayloadBody
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=http-
|
|
24
|
+
//# sourceMappingURL=http-LL3JD2JE.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
flushTraces,
|
|
9
9
|
parseRetryAfterMs,
|
|
10
10
|
serializePayloadBody
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-27B3UBSS.js";
|
|
12
12
|
export {
|
|
13
13
|
BitfabError,
|
|
14
14
|
HttpClient,
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
parseRetryAfterMs,
|
|
21
21
|
serializePayloadBody
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=http-
|
|
23
|
+
//# sourceMappingURL=http-QZDTQC3C.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.65.
|
|
45
|
+
__version__ = "0.65.4";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -6866,6 +6866,12 @@ function finishedRerun(datasetId, run, joinedExisting) {
|
|
|
6866
6866
|
}
|
|
6867
6867
|
return { run, joinedExisting };
|
|
6868
6868
|
}
|
|
6869
|
+
function normalizeDataset(dataset) {
|
|
6870
|
+
return { ...dataset, golden: dataset.golden ?? false };
|
|
6871
|
+
}
|
|
6872
|
+
function normalizeDatasetResult(response) {
|
|
6873
|
+
return { ...response, dataset: normalizeDataset(response.dataset) };
|
|
6874
|
+
}
|
|
6869
6875
|
function sleep(ms) {
|
|
6870
6876
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
6871
6877
|
}
|
|
@@ -6882,11 +6888,13 @@ var DatasetsClient = class {
|
|
|
6882
6888
|
* leaves an existing one untouched.
|
|
6883
6889
|
*/
|
|
6884
6890
|
async save(params) {
|
|
6885
|
-
|
|
6891
|
+
const response = await this.httpClient.request("/api/sdk/datasets", {
|
|
6886
6892
|
traceFunctionKey: params.traceFunctionKey,
|
|
6887
6893
|
name: params.name,
|
|
6888
|
-
...params.description === void 0 ? {} : { description: params.description }
|
|
6894
|
+
...params.description === void 0 ? {} : { description: params.description },
|
|
6895
|
+
...typeof params.golden === "boolean" ? { golden: params.golden } : {}
|
|
6889
6896
|
});
|
|
6897
|
+
return normalizeDatasetResult(response);
|
|
6890
6898
|
}
|
|
6891
6899
|
/**
|
|
6892
6900
|
* Rename a dataset or change its description in place. The dataset keeps its
|
|
@@ -6896,18 +6904,21 @@ var DatasetsClient = class {
|
|
|
6896
6904
|
* organization.
|
|
6897
6905
|
*/
|
|
6898
6906
|
async update(datasetId, params) {
|
|
6899
|
-
if (params.name === void 0 && params.description === void 0) {
|
|
6900
|
-
throw new BitfabError(
|
|
6907
|
+
if (params.name === void 0 && params.description === void 0 && params.golden === void 0) {
|
|
6908
|
+
throw new BitfabError(
|
|
6909
|
+
"Provide name, description, and/or golden to update."
|
|
6910
|
+
);
|
|
6901
6911
|
}
|
|
6902
6912
|
const response = await this.httpClient.request(
|
|
6903
6913
|
datasetPath(datasetId),
|
|
6904
6914
|
{
|
|
6905
6915
|
...params.name === void 0 ? {} : { name: params.name },
|
|
6906
|
-
...params.description === void 0 ? {} : { description: params.description }
|
|
6916
|
+
...params.description === void 0 ? {} : { description: params.description },
|
|
6917
|
+
...typeof params.golden === "boolean" ? { golden: params.golden } : {}
|
|
6907
6918
|
},
|
|
6908
6919
|
{ method: "PATCH" }
|
|
6909
6920
|
);
|
|
6910
|
-
return response.dataset;
|
|
6921
|
+
return normalizeDataset(response.dataset);
|
|
6911
6922
|
}
|
|
6912
6923
|
/**
|
|
6913
6924
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
@@ -6925,7 +6936,7 @@ var DatasetsClient = class {
|
|
|
6925
6936
|
query.set("cursor", cursor);
|
|
6926
6937
|
}
|
|
6927
6938
|
const response = await this.httpClient.get(`/api/sdk/datasets?${query}`);
|
|
6928
|
-
datasets.push(...response.datasets);
|
|
6939
|
+
datasets.push(...response.datasets.map(normalizeDataset));
|
|
6929
6940
|
cursor = response.nextCursor ?? void 0;
|
|
6930
6941
|
} while (cursor !== void 0);
|
|
6931
6942
|
return datasets;
|
|
@@ -6935,7 +6946,7 @@ var DatasetsClient = class {
|
|
|
6935
6946
|
const response = await this.httpClient.get(
|
|
6936
6947
|
datasetPath(datasetId)
|
|
6937
6948
|
);
|
|
6938
|
-
return response.dataset;
|
|
6949
|
+
return normalizeDataset(response.dataset);
|
|
6939
6950
|
}
|
|
6940
6951
|
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
6941
6952
|
async listTraces(datasetId) {
|
|
@@ -6956,17 +6967,13 @@ var DatasetsClient = class {
|
|
|
6956
6967
|
* `skippedTraceIds` rather than failing the call.
|
|
6957
6968
|
*/
|
|
6958
6969
|
async addTraces(datasetId, traceIds) {
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
{ traceIds }
|
|
6962
|
-
);
|
|
6970
|
+
const response = await this.httpClient.request(datasetPath(datasetId, "/traces"), { traceIds });
|
|
6971
|
+
return normalizeDatasetResult(response);
|
|
6963
6972
|
}
|
|
6964
6973
|
/** Remove traces from the dataset. The traces themselves are never deleted. */
|
|
6965
6974
|
async removeTraces(datasetId, traceIds) {
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
{ traceIds }
|
|
6969
|
-
);
|
|
6975
|
+
const response = await this.httpClient.request(datasetPath(datasetId, "/removeTraces"), { traceIds });
|
|
6976
|
+
return normalizeDatasetResult(response);
|
|
6970
6977
|
}
|
|
6971
6978
|
/**
|
|
6972
6979
|
* Assign graders to the dataset (1 to 100 ids per call). Graders outside the
|
|
@@ -6974,17 +6981,13 @@ var DatasetsClient = class {
|
|
|
6974
6981
|
* `skippedGraderIds` rather than failing the call.
|
|
6975
6982
|
*/
|
|
6976
6983
|
async addGraders(datasetId, graderIds) {
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
{ graderIds }
|
|
6980
|
-
);
|
|
6984
|
+
const response = await this.httpClient.request(datasetPath(datasetId, "/graders"), { graderIds });
|
|
6985
|
+
return normalizeDatasetResult(response);
|
|
6981
6986
|
}
|
|
6982
6987
|
/** Unassign graders from the dataset. */
|
|
6983
6988
|
async removeGraders(datasetId, graderIds) {
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
{ graderIds }
|
|
6987
|
-
);
|
|
6989
|
+
const response = await this.httpClient.request(datasetPath(datasetId, "/removeGraders"), { graderIds });
|
|
6990
|
+
return normalizeDatasetResult(response);
|
|
6988
6991
|
}
|
|
6989
6992
|
async rerunGraders(datasetId, options = {}) {
|
|
6990
6993
|
const started = await this.httpClient.request(
|