@bitfab/sdk 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-KTBWJLIN.js → chunk-BOXLWX73.js} +2 -2
- package/dist/{chunk-KTBWJLIN.js.map → chunk-BOXLWX73.js.map} +1 -1
- package/dist/{chunk-4GMZN76Y.js → chunk-IDQBDBNS.js} +3 -3
- package/dist/{chunk-BZML7OQD.js → chunk-PAL7VIWM.js} +2 -2
- package/dist/{chunk-WQOA3SFF.js → chunk-Q7IB5VFZ.js} +33 -16
- package/dist/chunk-Q7IB5VFZ.js.map +1 -0
- package/dist/{chunk-OWZF23WR.js → chunk-RMATODGT.js} +2 -2
- package/dist/{chunk-OWZF23WR.js.map → chunk-RMATODGT.js.map} +1 -1
- package/dist/{http-6NM3JD5W.js → http-3WOABXYN.js} +2 -2
- package/dist/{http-HSCOLYYK.js → http-6F3OLGWX.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-V3AN37XH.js → replay-HVLPMPVQ.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-WQOA3SFF.js.map +0 -1
- /package/dist/{chunk-4GMZN76Y.js.map → chunk-IDQBDBNS.js.map} +0 -0
- /package/dist/{chunk-BZML7OQD.js.map → chunk-PAL7VIWM.js.map} +0 -0
- /package/dist/{http-6NM3JD5W.js.map → http-3WOABXYN.js.map} +0 -0
- /package/dist/{http-HSCOLYYK.js.map → http-6F3OLGWX.js.map} +0 -0
- /package/dist/{replay-V3AN37XH.js.map → replay-HVLPMPVQ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1259,12 +1259,12 @@ declare class DatasetsClient {
|
|
|
1259
1259
|
save(params: SaveDatasetParams): Promise<SaveDatasetResult>;
|
|
1260
1260
|
/**
|
|
1261
1261
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
1262
|
-
* given and organization-wide otherwise.
|
|
1262
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
1263
1263
|
*/
|
|
1264
1264
|
list(params?: ListDatasetsParams): Promise<Dataset[]>;
|
|
1265
1265
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
1266
1266
|
get(datasetId: string): Promise<Dataset>;
|
|
1267
|
-
/**
|
|
1267
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
1268
1268
|
listTraces(datasetId: string): Promise<DatasetTraceIds>;
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -3344,7 +3344,7 @@ interface CommitRef {
|
|
|
3344
3344
|
/**
|
|
3345
3345
|
* SDK version from package.json (injected at build time)
|
|
3346
3346
|
*/
|
|
3347
|
-
declare const __version__ = "0.53.
|
|
3347
|
+
declare const __version__ = "0.53.5";
|
|
3348
3348
|
|
|
3349
3349
|
/**
|
|
3350
3350
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -1259,12 +1259,12 @@ declare class DatasetsClient {
|
|
|
1259
1259
|
save(params: SaveDatasetParams): Promise<SaveDatasetResult>;
|
|
1260
1260
|
/**
|
|
1261
1261
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
1262
|
-
* given and organization-wide otherwise.
|
|
1262
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
1263
1263
|
*/
|
|
1264
1264
|
list(params?: ListDatasetsParams): Promise<Dataset[]>;
|
|
1265
1265
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
1266
1266
|
get(datasetId: string): Promise<Dataset>;
|
|
1267
|
-
/**
|
|
1267
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
1268
1268
|
listTraces(datasetId: string): Promise<DatasetTraceIds>;
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|
|
@@ -3344,7 +3344,7 @@ interface CommitRef {
|
|
|
3344
3344
|
/**
|
|
3345
3345
|
* SDK version from package.json (injected at build time)
|
|
3346
3346
|
*/
|
|
3347
|
-
declare const __version__ = "0.53.
|
|
3347
|
+
declare const __version__ = "0.53.5";
|
|
3348
3348
|
|
|
3349
3349
|
/**
|
|
3350
3350
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getCurrentTrace,
|
|
20
20
|
reseedFromRegistry,
|
|
21
21
|
seedFromRegistry
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q7IB5VFZ.js";
|
|
23
23
|
import "./chunk-EGWJYCNT.js";
|
|
24
24
|
import {
|
|
25
25
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
ReplayError,
|
|
29
29
|
reportReplayProgress,
|
|
30
30
|
serializeReplayResult
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PAL7VIWM.js";
|
|
32
32
|
import {
|
|
33
33
|
BitfabError,
|
|
34
34
|
DEFAULT_SERVICE_URL,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
MixedTracingError,
|
|
37
37
|
__version__,
|
|
38
38
|
flushTraces
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-BOXLWX73.js";
|
|
40
40
|
import "./chunk-VCRFFCLY.js";
|
|
41
41
|
export {
|
|
42
42
|
BITFAB_PROGRESS_PREFIX,
|
package/dist/node.cjs
CHANGED
|
@@ -88,7 +88,7 @@ var __version__, __packageName__;
|
|
|
88
88
|
var init_version_generated = __esm({
|
|
89
89
|
"src/version.generated.ts"() {
|
|
90
90
|
"use strict";
|
|
91
|
-
__version__ = "0.53.
|
|
91
|
+
__version__ = "0.53.5";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -5539,14 +5539,24 @@ var DatasetsClient = class {
|
|
|
5539
5539
|
}
|
|
5540
5540
|
/**
|
|
5541
5541
|
* List datasets, scoped to one trace function when `traceFunctionKey` is
|
|
5542
|
-
* given and organization-wide otherwise.
|
|
5542
|
+
* given and organization-wide otherwise. Fetches all pages automatically.
|
|
5543
5543
|
*/
|
|
5544
5544
|
async list(params = {}) {
|
|
5545
|
-
const
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5545
|
+
const datasets = [];
|
|
5546
|
+
let cursor;
|
|
5547
|
+
do {
|
|
5548
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
5549
|
+
if (params.traceFunctionKey !== void 0) {
|
|
5550
|
+
query.set("traceFunctionKey", params.traceFunctionKey);
|
|
5551
|
+
}
|
|
5552
|
+
if (cursor !== void 0) {
|
|
5553
|
+
query.set("cursor", cursor);
|
|
5554
|
+
}
|
|
5555
|
+
const response = await this.httpClient.get(`/api/sdk/datasets?${query}`);
|
|
5556
|
+
datasets.push(...response.datasets);
|
|
5557
|
+
cursor = response.nextCursor ?? void 0;
|
|
5558
|
+
} while (cursor !== void 0);
|
|
5559
|
+
return datasets;
|
|
5550
5560
|
}
|
|
5551
5561
|
/** Fetch one dataset by id. Rejects with a 404 `BitfabError` when it is not in this organization. */
|
|
5552
5562
|
async get(datasetId) {
|
|
@@ -5555,11 +5565,18 @@ var DatasetsClient = class {
|
|
|
5555
5565
|
);
|
|
5556
5566
|
return response.dataset;
|
|
5557
5567
|
}
|
|
5558
|
-
/**
|
|
5568
|
+
/** Fetches all trace-ID pages, the same membership a replay with `datasetId` selects. */
|
|
5559
5569
|
async listTraces(datasetId) {
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
)
|
|
5570
|
+
const traceIds = [];
|
|
5571
|
+
const query = new URLSearchParams({ limit: "100" });
|
|
5572
|
+
for (; ; ) {
|
|
5573
|
+
const page = await this.httpClient.get(`${datasetPath(datasetId, "/traces")}?${query}`);
|
|
5574
|
+
traceIds.push(...page.traceIds);
|
|
5575
|
+
if (page.nextCursor === void 0 || page.nextCursor === null) {
|
|
5576
|
+
return { datasetId: page.datasetId, traceIds };
|
|
5577
|
+
}
|
|
5578
|
+
query.set("cursor", page.nextCursor);
|
|
5579
|
+
}
|
|
5563
5580
|
}
|
|
5564
5581
|
/**
|
|
5565
5582
|
* Add traces to the dataset (1 to 100 ids per call). Traces outside the
|