bitfab 0.53.4 → 0.53.5
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-YD5XI5YH.js → chunk-7UOWGJFK.js} +3 -3
- package/dist/{chunk-DIYUW2KO.js → chunk-A67P4IPJ.js} +2 -2
- package/dist/{chunk-DIYUW2KO.js.map → chunk-A67P4IPJ.js.map} +1 -1
- package/dist/{chunk-JKVR5436.js → chunk-HIWCN36R.js} +2 -2
- package/dist/{chunk-RZC7MYVZ.js → chunk-I6HABUAU.js} +2 -2
- package/dist/{chunk-RZC7MYVZ.js.map → chunk-I6HABUAU.js.map} +1 -1
- package/dist/{chunk-53RMN23L.js → chunk-JMZSZD22.js} +33 -16
- package/dist/chunk-JMZSZD22.js.map +1 -0
- package/dist/{http-VRS3FQU3.js → http-7G364U2F.js} +2 -2
- package/dist/{http-7WGJNBGI.js → http-VZG3GUGE.js} +2 -2
- package/dist/index.cjs +28 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/node.cjs +28 -11
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-LRCSZ7IX.js → replay-2PZ7OOTJ.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-53RMN23L.js.map +0 -1
- /package/dist/{chunk-YD5XI5YH.js.map → chunk-7UOWGJFK.js.map} +0 -0
- /package/dist/{chunk-JKVR5436.js.map → chunk-HIWCN36R.js.map} +0 -0
- /package/dist/{http-7WGJNBGI.js.map → http-7G364U2F.js.map} +0 -0
- /package/dist/{http-VRS3FQU3.js.map → http-VZG3GUGE.js.map} +0 -0
- /package/dist/{replay-LRCSZ7IX.js.map → replay-2PZ7OOTJ.js.map} +0 -0
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
serializeValue,
|
|
20
20
|
toJsonSafe,
|
|
21
21
|
toJsonSafeReport
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HIWCN36R.js";
|
|
23
23
|
import {
|
|
24
24
|
BitfabError,
|
|
25
25
|
DEFAULT_SERVICE_URL,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
recordCallerTraceMetadata,
|
|
36
36
|
retireTraceMetadata,
|
|
37
37
|
warnOnce
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-I6HABUAU.js";
|
|
39
39
|
import {
|
|
40
40
|
__privateAdd,
|
|
41
41
|
__privateGet,
|
|
@@ -1290,14 +1290,24 @@ var DatasetsClient = class {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
/**
|
|
1292
1292
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
1293
|
-
* given and organization-wide otherwise.
|
|
1293
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
1294
1294
|
*/
|
|
1295
1295
|
async list(params = {}) {
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1296
|
+
const datasets = [];
|
|
1297
|
+
let cursor;
|
|
1298
|
+
do {
|
|
1299
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
1300
|
+
if (params.traceFunctionKey !== void 0) {
|
|
1301
|
+
query.set("traceFunctionKey", params.traceFunctionKey);
|
|
1302
|
+
}
|
|
1303
|
+
if (cursor !== void 0) {
|
|
1304
|
+
query.set("cursor", cursor);
|
|
1305
|
+
}
|
|
1306
|
+
const response = await this.httpClient.get(`/api/sdk/datasets?${query}`);
|
|
1307
|
+
datasets.push(...response.datasets);
|
|
1308
|
+
cursor = response.nextCursor ?? void 0;
|
|
1309
|
+
} while (cursor !== void 0);
|
|
1310
|
+
return datasets;
|
|
1301
1311
|
}
|
|
1302
1312
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
1303
1313
|
async get(datasetId) {
|
|
@@ -1306,11 +1316,18 @@ var DatasetsClient = class {
|
|
|
1306
1316
|
);
|
|
1307
1317
|
return response.dataset;
|
|
1308
1318
|
}
|
|
1309
|
-
/**
|
|
1319
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
1310
1320
|
async listTraces(datasetId) {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
)
|
|
1321
|
+
const traceIds = [];
|
|
1322
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
1323
|
+
for (; ; ) {
|
|
1324
|
+
const page = await this.httpClient.get(`${datasetPath(datasetId, "/traces")}?${query}`);
|
|
1325
|
+
traceIds.push(...page.traceIds);
|
|
1326
|
+
if (page.nextCursor === void 0 || page.nextCursor === null) {
|
|
1327
|
+
return { datasetId: page.datasetId, traceIds };
|
|
1328
|
+
}
|
|
1329
|
+
query.set("cursor", page.nextCursor);
|
|
1330
|
+
}
|
|
1314
1331
|
}
|
|
1315
1332
|
/**
|
|
1316
1333
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -5059,7 +5076,7 @@ var Bitfab = class {
|
|
|
5059
5076
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
5060
5077
|
} finally {
|
|
5061
5078
|
try {
|
|
5062
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
5079
|
+
const { flushTraces: flushTraces2 } = await import("./http-VZG3GUGE.js");
|
|
5063
5080
|
await flushTraces2(3e4);
|
|
5064
5081
|
} finally {
|
|
5065
5082
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -5118,7 +5135,7 @@ var Bitfab = class {
|
|
|
5118
5135
|
`Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
|
|
5119
5136
|
);
|
|
5120
5137
|
}
|
|
5121
|
-
const { replay: doReplay } = await import("./replay-
|
|
5138
|
+
const { replay: doReplay } = await import("./replay-2PZ7OOTJ.js");
|
|
5122
5139
|
return doReplay(
|
|
5123
5140
|
this.httpClient,
|
|
5124
5141
|
this.serviceUrl,
|
|
@@ -5402,7 +5419,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
5402
5419
|
sessionId: seedCase.sessionId
|
|
5403
5420
|
})
|
|
5404
5421
|
);
|
|
5405
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
5422
|
+
const { flushTraces: flushTraces2 } = await import("./http-VZG3GUGE.js");
|
|
5406
5423
|
await flushTraces2(3e4);
|
|
5407
5424
|
return { pipeline, traceFunctionKey, traceIds };
|
|
5408
5425
|
}
|
|
@@ -5439,4 +5456,4 @@ export {
|
|
|
5439
5456
|
reseedFromRegistry,
|
|
5440
5457
|
seedFromRegistry
|
|
5441
5458
|
};
|
|
5442
|
-
//# sourceMappingURL=chunk-
|
|
5459
|
+
//# sourceMappingURL=chunk-JMZSZD22.js.map
|