bitfab 0.64.15 → 0.64.17

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 (38) hide show
  1. package/cloudReplay.py +282 -24
  2. package/dist/{chunk-XFILHSJQ.js → chunk-424DGY5C.js} +204 -89
  3. package/dist/chunk-424DGY5C.js.map +1 -0
  4. package/dist/chunk-CAPJNFVL.js +1905 -0
  5. package/dist/chunk-CAPJNFVL.js.map +1 -0
  6. package/dist/{chunk-H3IS35BR.js → chunk-QXL4BWR7.js} +30 -6
  7. package/dist/chunk-QXL4BWR7.js.map +1 -0
  8. package/dist/{chunk-6HYQU37D.js → chunk-SHLXQATL.js} +16 -2
  9. package/dist/{chunk-6HYQU37D.js.map → chunk-SHLXQATL.js.map} +1 -1
  10. package/dist/{chunk-Y4EBZJKB.js → chunk-TL7SEFMM.js} +2 -2
  11. package/dist/{chunk-Y4EBZJKB.js.map → chunk-TL7SEFMM.js.map} +1 -1
  12. package/dist/{chunk-ZJ63UJV6.js → chunk-YKPUKZJ2.js} +2 -2
  13. package/dist/{http-FC3EJJEW.js → http-LGFMXXJT.js} +2 -2
  14. package/dist/{http-YE3AJM6H.js → http-X5ZUGL5H.js} +2 -2
  15. package/dist/index.cjs +25 -1
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +99 -2
  18. package/dist/index.d.ts +99 -2
  19. package/dist/index.js +3 -3
  20. package/dist/node.cjs +25 -1
  21. package/dist/node.cjs.map +1 -1
  22. package/dist/node.d.cts +1 -1
  23. package/dist/node.d.ts +1 -1
  24. package/dist/node.js +3 -3
  25. package/dist/replay-JNQDEFND.js +28 -0
  26. package/dist/{replay-3D27NV7E.js → replay-TY6224JF.js} +3 -3
  27. package/dist/replay-TY6224JF.js.map +1 -0
  28. package/dist/replayCli.js +3 -2
  29. package/dist/replayCli.js.map +1 -1
  30. package/dist/seedCli.js +3 -2
  31. package/dist/seedCli.js.map +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunk-H3IS35BR.js.map +0 -1
  34. package/dist/chunk-XFILHSJQ.js.map +0 -1
  35. /package/dist/{chunk-ZJ63UJV6.js.map → chunk-YKPUKZJ2.js.map} +0 -0
  36. /package/dist/{http-FC3EJJEW.js.map → http-LGFMXXJT.js.map} +0 -0
  37. /package/dist/{http-YE3AJM6H.js.map → http-X5ZUGL5H.js.map} +0 -0
  38. /package/dist/{replay-3D27NV7E.js.map → replay-JNQDEFND.js.map} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  replayContextReady,
9
9
  runWithReplayContext,
10
10
  unrefTimer
11
- } from "./chunk-Y4EBZJKB.js";
11
+ } from "./chunk-TL7SEFMM.js";
12
12
  import {
13
13
  runWithCaptureSuppressed,
14
14
  warnOnce,
@@ -2050,4 +2050,4 @@ export {
2050
2050
  warnJudgeAssertionsDeprecated,
2051
2051
  replay
2052
2052
  };
2053
- //# sourceMappingURL=chunk-ZJ63UJV6.js.map
2053
+ //# sourceMappingURL=chunk-YKPUKZJ2.js.map
@@ -7,7 +7,7 @@ import {
7
7
  flushTraces,
8
8
  parseRetryAfterMs,
9
9
  serializePayloadBody
10
- } from "./chunk-Y4EBZJKB.js";
10
+ } from "./chunk-TL7SEFMM.js";
11
11
  import "./chunk-MT36GJMW.js";
12
12
  export {
13
13
  BitfabError,
@@ -19,4 +19,4 @@ export {
19
19
  parseRetryAfterMs,
20
20
  serializePayloadBody
21
21
  };
22
- //# sourceMappingURL=http-FC3EJJEW.js.map
22
+ //# sourceMappingURL=http-LGFMXXJT.js.map
@@ -7,7 +7,7 @@ import {
7
7
  flushTraces,
8
8
  parseRetryAfterMs,
9
9
  serializePayloadBody
10
- } from "./chunk-6HYQU37D.js";
10
+ } from "./chunk-SHLXQATL.js";
11
11
  export {
12
12
  BitfabError,
13
13
  HttpClient,
@@ -18,4 +18,4 @@ export {
18
18
  parseRetryAfterMs,
19
19
  serializePayloadBody
20
20
  };
21
- //# sourceMappingURL=http-YE3AJM6H.js.map
21
+ //# sourceMappingURL=http-X5ZUGL5H.js.map
package/dist/index.cjs CHANGED
@@ -51,7 +51,7 @@ var __version__, __packageName__;
51
51
  var init_version_generated = __esm({
52
52
  "src/version.generated.ts"() {
53
53
  "use strict";
54
- __version__ = "0.64.15";
54
+ __version__ = "0.64.17";
55
55
  __packageName__ = "bitfab";
56
56
  }
57
57
  });
@@ -8938,6 +8938,9 @@ function draftsInGenerationOrder(assertions, assertionIds) {
8938
8938
  function traceAssertionsPath(traceId, suffix = "") {
8939
8939
  return `/api/sdk/traces/${encodeURIComponent(traceId)}/assertions${suffix}`;
8940
8940
  }
8941
+ function traceScenarioPath(traceId) {
8942
+ return `/api/sdk/traces/${encodeURIComponent(traceId)}/scenario`;
8943
+ }
8941
8944
  var TracesClient = class {
8942
8945
  constructor(httpClient) {
8943
8946
  this.httpClient = httpClient;
@@ -9001,6 +9004,22 @@ var TracesClient = class {
9001
9004
  );
9002
9005
  return response.archived;
9003
9006
  }
9007
+ async getScenario(traceId) {
9008
+ const response = await this.httpClient.get(
9009
+ traceScenarioPath(traceId)
9010
+ );
9011
+ return response.scenario;
9012
+ }
9013
+ async saveScenario({
9014
+ traceId,
9015
+ ...edit
9016
+ }) {
9017
+ const response = await this.httpClient.request(
9018
+ traceScenarioPath(traceId),
9019
+ edit
9020
+ );
9021
+ return response.scenario;
9022
+ }
9004
9023
  };
9005
9024
 
9006
9025
  // src/tracing.ts
@@ -9892,6 +9911,7 @@ function readEnv2(name) {
9892
9911
  return void 0;
9893
9912
  }
9894
9913
  var CAPTURE_ENABLED_ENV = "BITFAB_CAPTURE_ENABLED";
9914
+ var REPLAY_API_KEY_ENV = "BITFAB_REPLAY_BITFAB_API_KEY";
9895
9915
  var TRUE_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes"]);
9896
9916
  var FALSE_ENV_VALUES = /* @__PURE__ */ new Set(["0", "false", "no"]);
9897
9917
  function readBooleanEnv(name) {
@@ -10406,6 +10426,10 @@ var Bitfab = class {
10406
10426
  * early resolve that found nothing never poisons a later one.
10407
10427
  */
10408
10428
  findApiKey(callsKeyFunction) {
10429
+ const replayKey = readEnv2(REPLAY_API_KEY_ENV);
10430
+ if (replayKey && replayKey.trim() !== "") {
10431
+ return replayKey;
10432
+ }
10409
10433
  if (this.resolvedApiKey !== void 0) {
10410
10434
  return this.resolvedApiKey;
10411
10435
  }