@bitfab/sdk 0.64.14 → 0.64.16

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.
Files changed (32) hide show
  1. package/cloudReplay.py +250 -55
  2. package/dist/{chunk-F5ZFL5W6.js → chunk-AXFKZYIY.js} +25 -6
  3. package/dist/chunk-AXFKZYIY.js.map +1 -0
  4. package/dist/{chunk-GURR5AWG.js → chunk-I4TFQZCW.js} +2 -2
  5. package/dist/{chunk-GURR5AWG.js.map → chunk-I4TFQZCW.js.map} +1 -1
  6. package/dist/{chunk-2EWCNKQL.js → chunk-LOIVELPI.js} +10 -5
  7. package/dist/{chunk-2EWCNKQL.js.map → chunk-LOIVELPI.js.map} +1 -1
  8. package/dist/{chunk-PXNFY22G.js → chunk-NNZAQSTW.js} +2 -2
  9. package/dist/{chunk-A7NX4OKG.js → chunk-PAWBCEI7.js} +2 -2
  10. package/dist/{chunk-A7NX4OKG.js.map → chunk-PAWBCEI7.js.map} +1 -1
  11. package/dist/{http-QX6O4EDS.js → http-LV7OUBKA.js} +2 -2
  12. package/dist/{http-C44ETCJK.js → http-QQ6VVHUZ.js} +2 -2
  13. package/dist/index.cjs +20 -1
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +99 -2
  16. package/dist/index.d.ts +99 -2
  17. package/dist/index.js +3 -3
  18. package/dist/node.cjs +20 -1
  19. package/dist/node.cjs.map +1 -1
  20. package/dist/node.d.cts +1 -1
  21. package/dist/node.d.ts +1 -1
  22. package/dist/node.js +3 -3
  23. package/dist/{replay-MFZF4SY7.js → replay-JNKXZPY7.js} +3 -3
  24. package/dist/replayCli.js +13 -2
  25. package/dist/replayCli.js.map +1 -1
  26. package/dist/seedCli.js +2 -2
  27. package/package.json +1 -1
  28. package/dist/chunk-F5ZFL5W6.js.map +0 -1
  29. /package/dist/{chunk-PXNFY22G.js.map → chunk-NNZAQSTW.js.map} +0 -0
  30. /package/dist/{http-C44ETCJK.js.map → http-LV7OUBKA.js.map} +0 -0
  31. /package/dist/{http-QX6O4EDS.js.map → http-QQ6VVHUZ.js.map} +0 -0
  32. /package/dist/{replay-MFZF4SY7.js.map → replay-JNKXZPY7.js.map} +0 -0
@@ -17,7 +17,7 @@ import {
17
17
  serializeValue,
18
18
  toJsonSafe,
19
19
  toJsonSafeReport
20
- } from "./chunk-PXNFY22G.js";
20
+ } from "./chunk-NNZAQSTW.js";
21
21
  import {
22
22
  BitfabError,
23
23
  CONTENT_OFF_KEY,
@@ -36,7 +36,7 @@ import {
36
36
  readEnv,
37
37
  recordCallerTraceMetadata,
38
38
  retireTraceMetadata
39
- } from "./chunk-A7NX4OKG.js";
39
+ } from "./chunk-PAWBCEI7.js";
40
40
  import {
41
41
  __privateAdd,
42
42
  __privateGet,
@@ -3376,6 +3376,9 @@ function draftsInGenerationOrder(assertions, assertionIds) {
3376
3376
  function traceAssertionsPath(traceId, suffix = "") {
3377
3377
  return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
3378
3378
  }
3379
+ function traceScenarioPath(traceId) {
3380
+ return `/api/sdk/traces/${encodeURIComponent(traceId)}/scenario`;
3381
+ }
3379
3382
  var TracesClient = class {
3380
3383
  constructor(httpClient) {
3381
3384
  this.httpClient = httpClient;
@@ -3439,6 +3442,22 @@ var TracesClient = class {
3439
3442
  );
3440
3443
  return response.archived;
3441
3444
  }
3445
+ async getScenario(traceId) {
3446
+ const response = await this.httpClient.get(
3447
+ traceScenarioPath(traceId)
3448
+ );
3449
+ return response.scenario;
3450
+ }
3451
+ async saveScenario({
3452
+ traceId,
3453
+ ...edit
3454
+ }) {
3455
+ const response = await this.httpClient.request(
3456
+ traceScenarioPath(traceId),
3457
+ edit
3458
+ );
3459
+ return response.scenario;
3460
+ }
3442
3461
  };
3443
3462
 
3444
3463
  // src/tracing.ts
@@ -6283,7 +6302,7 @@ var Bitfab = class {
6283
6302
  await runWithSeedContext({ traceId }, async () => target(...args));
6284
6303
  } finally {
6285
6304
  try {
6286
- const { flushTraces: flushTraces2 } = await import("./http-QX6O4EDS.js");
6305
+ const { flushTraces: flushTraces2 } = await import("./http-LV7OUBKA.js");
6287
6306
  await flushTraces2(3e4);
6288
6307
  } finally {
6289
6308
  unrecorded = activeTraceStates.delete(traceId);
@@ -6342,7 +6361,7 @@ var Bitfab = class {
6342
6361
  `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.`
6343
6362
  );
6344
6363
  }
6345
- const { replay: doReplay } = await import("./replay-MFZF4SY7.js");
6364
+ const { replay: doReplay } = await import("./replay-JNKXZPY7.js");
6346
6365
  return doReplay(
6347
6366
  this.httpClient,
6348
6367
  this.serviceUrl,
@@ -6688,7 +6707,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
6688
6707
  sessionId: seedCase.sessionId
6689
6708
  })
6690
6709
  );
6691
- const { flushTraces: flushTraces2 } = await import("./http-QX6O4EDS.js");
6710
+ const { flushTraces: flushTraces2 } = await import("./http-LV7OUBKA.js");
6692
6711
  await flushTraces2(3e4);
6693
6712
  return { pipeline, traceFunctionKey, traceIds };
6694
6713
  }
@@ -6733,4 +6752,4 @@ export {
6733
6752
  reseedFromRegistry,
6734
6753
  seedFromRegistry
6735
6754
  };
6736
- //# sourceMappingURL=chunk-F5ZFL5W6.js.map
6755
+ //# sourceMappingURL=chunk-AXFKZYIY.js.map