@bitfab/sdk 0.58.4 → 0.58.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.
Files changed (39) hide show
  1. package/dist/autoTrace.cjs +50 -4
  2. package/dist/autoTrace.cjs.map +1 -1
  3. package/dist/autoTrace.d.cts +2 -1
  4. package/dist/autoTrace.d.ts +2 -1
  5. package/dist/autoTrace.js +4 -2
  6. package/dist/{chunk-VCRFFCLY.js → chunk-BAOIRE5T.js} +20 -2
  7. package/dist/chunk-BAOIRE5T.js.map +1 -0
  8. package/dist/{chunk-3LJVTDD5.js → chunk-E25HU4YZ.js} +2 -2
  9. package/dist/{chunk-3LJVTDD5.js.map → chunk-E25HU4YZ.js.map} +1 -1
  10. package/dist/{chunk-RCHSYWKI.js → chunk-ETZUSSF6.js} +38 -8
  11. package/dist/chunk-ETZUSSF6.js.map +1 -0
  12. package/dist/{chunk-ZLAFCSCP.js → chunk-IP2AYKT7.js} +6 -21
  13. package/dist/chunk-IP2AYKT7.js.map +1 -0
  14. package/dist/{chunk-74ECLOFY.js → chunk-NNSJVCR3.js} +3 -3
  15. package/dist/{chunk-UKJ3RWVS.js → chunk-Y47DQCCK.js} +11 -11
  16. package/dist/{chunk-BVUGW7BJ.js → chunk-YGZA3H67.js} +6 -6
  17. package/dist/{http-NG5NP6PH.js → http-6K4GQC4S.js} +2 -2
  18. package/dist/{http-XTSUPZEC.js → http-PVE62D6W.js} +3 -3
  19. package/dist/index.cjs +26 -5
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +5 -5
  24. package/dist/node.cjs +26 -5
  25. package/dist/node.cjs.map +1 -1
  26. package/dist/node.js +5 -5
  27. package/dist/{replay-JHFO457Z.js → replay-6WA5GD4R.js} +4 -4
  28. package/dist/replayCli.js +2 -2
  29. package/dist/seedCli.js +2 -2
  30. package/package.json +1 -1
  31. package/dist/chunk-RCHSYWKI.js.map +0 -1
  32. package/dist/chunk-VCRFFCLY.js.map +0 -1
  33. package/dist/chunk-ZLAFCSCP.js.map +0 -1
  34. /package/dist/{chunk-74ECLOFY.js.map → chunk-NNSJVCR3.js.map} +0 -0
  35. /package/dist/{chunk-UKJ3RWVS.js.map → chunk-Y47DQCCK.js.map} +0 -0
  36. /package/dist/{chunk-BVUGW7BJ.js.map → chunk-YGZA3H67.js.map} +0 -0
  37. /package/dist/{http-NG5NP6PH.js.map → http-6K4GQC4S.js.map} +0 -0
  38. /package/dist/{http-XTSUPZEC.js.map → http-PVE62D6W.js.map} +0 -0
  39. /package/dist/{replay-JHFO457Z.js.map → replay-6WA5GD4R.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -3659,7 +3659,7 @@ interface CommitRef {
3659
3659
  /**
3660
3660
  * SDK version from package.json (injected at build time)
3661
3661
  */
3662
- declare const __version__ = "0.58.4";
3662
+ declare const __version__ = "0.58.5";
3663
3663
 
3664
3664
  /**
3665
3665
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -3659,7 +3659,7 @@ interface CommitRef {
3659
3659
  /**
3660
3660
  * SDK version from package.json (injected at build time)
3661
3661
  */
3662
- declare const __version__ = "0.58.4";
3662
+ declare const __version__ = "0.58.5";
3663
3663
 
3664
3664
  /**
3665
3665
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -22,8 +22,8 @@ import {
22
22
  getCurrentTrace,
23
23
  reseedFromRegistry,
24
24
  seedFromRegistry
25
- } from "./chunk-UKJ3RWVS.js";
26
- import "./chunk-RCHSYWKI.js";
25
+ } from "./chunk-Y47DQCCK.js";
26
+ import "./chunk-ETZUSSF6.js";
27
27
  import {
28
28
  BITFAB_PROGRESS_PREFIX,
29
29
  DbBranchReplayError,
@@ -31,7 +31,7 @@ import {
31
31
  ReplayError,
32
32
  reportReplayProgress,
33
33
  serializeReplayResult
34
- } from "./chunk-BVUGW7BJ.js";
34
+ } from "./chunk-YGZA3H67.js";
35
35
  import {
36
36
  BitfabError,
37
37
  DEFAULT_SERVICE_URL,
@@ -39,8 +39,8 @@ import {
39
39
  MixedTracingError,
40
40
  __version__,
41
41
  flushTraces
42
- } from "./chunk-ZLAFCSCP.js";
43
- import "./chunk-VCRFFCLY.js";
42
+ } from "./chunk-IP2AYKT7.js";
43
+ import "./chunk-BAOIRE5T.js";
44
44
  export {
45
45
  AssertionCategoriesClient,
46
46
  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.58.4";
91
+ __version__ = "0.58.5";
92
92
  __packageName__ = "@bitfab/sdk";
93
93
  }
94
94
  });
@@ -5111,6 +5111,7 @@ init_asyncStorage();
5111
5111
  // src/autoTrace.ts
5112
5112
  init_asyncStorage();
5113
5113
  init_captureSuppression();
5114
+ init_warnOnce();
5114
5115
  var autoTraceGlobal = globalThis;
5115
5116
  var autoTraceState = autoTraceGlobal.__bitfabAutoTraceStateV4 ?? {
5116
5117
  storage: null,
@@ -5178,6 +5179,26 @@ function runWithAutoTraceNodeConfiguration(nodeConfiguration, fn) {
5178
5179
  }
5179
5180
  return result;
5180
5181
  }
5182
+ var SUBTREE_TRACING_DOCS_URL = "https://docs.bitfab.ai/typescript-sdk#experimental-subtree-tracing";
5183
+ function transformInstalled() {
5184
+ return autoTraceGlobal.__bitfab_auto_trace_transformed_v1__ === true;
5185
+ }
5186
+ function runsOnNode() {
5187
+ return typeof process !== "undefined" && Boolean(process.versions?.node);
5188
+ }
5189
+ function closeAutoTraceRoot() {
5190
+ autoTraceState.activeRoots -= 1;
5191
+ }
5192
+ function settleAutoTraceRoot(context) {
5193
+ closeAutoTraceRoot();
5194
+ if (transformInstalled() || !runsOnNode()) {
5195
+ return;
5196
+ }
5197
+ warnOnce(
5198
+ "auto-trace-transform-missing",
5199
+ `trace root "${context.traceFunctionKey}" recorded only its own span. No module in this build was compiled by @bitfab/transform, so calls beneath the root were not discovered. Install @bitfab/transform and add its adapter to the server build: ${SUBTREE_TRACING_DOCS_URL}`
5200
+ );
5201
+ }
5181
5202
  function runWithAutoTraceRootContext(context, spanStack, fn) {
5182
5203
  autoTraceState.activeRoots += 1;
5183
5204
  const entries = [
@@ -5188,19 +5209,19 @@ function runWithAutoTraceRootContext(context, spanStack, fn) {
5188
5209
  try {
5189
5210
  result = runWithAutoTraceScope({ entries }, fn);
5190
5211
  } catch (error) {
5191
- autoTraceState.activeRoots -= 1;
5212
+ settleAutoTraceRoot(context);
5192
5213
  throw error;
5193
5214
  }
5194
5215
  if (isAutoTraceAsyncGenerator(result)) {
5195
- autoTraceState.activeRoots -= 1;
5216
+ closeAutoTraceRoot();
5196
5217
  return wrapAutoTraceAsyncGenerator(context, spanStack, result);
5197
5218
  }
5198
5219
  if (result instanceof Promise) {
5199
5220
  return result.finally(() => {
5200
- autoTraceState.activeRoots -= 1;
5221
+ settleAutoTraceRoot(context);
5201
5222
  });
5202
5223
  }
5203
- autoTraceState.activeRoots -= 1;
5224
+ settleAutoTraceRoot(context);
5204
5225
  return result;
5205
5226
  }
5206
5227
  function invokeThroughAutoTraceEntries(entries, step, fn) {