bitfab 0.65.0 → 0.65.3

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 (93) hide show
  1. package/cloudReplay.py +207 -30
  2. package/dist/autoTrace.cjs +28 -0
  3. package/dist/autoTrace.cjs.map +1 -1
  4. package/dist/autoTrace.d.cts +2 -1
  5. package/dist/autoTrace.d.ts +2 -1
  6. package/dist/autoTrace.js +3 -1
  7. package/dist/{chunk-CYF5LGHB.js → chunk-CL66KPSI.js} +2 -2
  8. package/dist/{chunk-6FFC55V5.js → chunk-MNMG2BAE.js} +4 -4
  9. package/dist/chunk-MNMG2BAE.js.map +1 -0
  10. package/dist/{chunk-UKQOBPTJ.js → chunk-MPZBAVVQ.js} +2 -2
  11. package/dist/{chunk-UKQOBPTJ.js.map → chunk-MPZBAVVQ.js.map} +1 -1
  12. package/dist/{chunk-2A4MMF2B.js → chunk-NMPHLDEG.js} +2 -2
  13. package/dist/{chunk-MN3E2RUU.js → chunk-PTCLRG4E.js} +3 -3
  14. package/dist/{chunk-YWXQM6J3.js → chunk-QRNHRY7F.js} +28 -1
  15. package/dist/chunk-QRNHRY7F.js.map +1 -0
  16. package/dist/{chunk-BTCULORS.js → chunk-SE73IWU6.js} +29 -13
  17. package/dist/chunk-SE73IWU6.js.map +1 -0
  18. package/dist/{chunk-YXRWWUSR.js → chunk-VX6HW3LS.js} +2 -2
  19. package/dist/{chunk-YXRWWUSR.js.map → chunk-VX6HW3LS.js.map} +1 -1
  20. package/dist/{chunk-IBWW3SP4.js → chunk-YVJAOGHE.js} +2 -2
  21. package/dist/{chunk-GSHCHCB5.js → chunk-ZG6SHKEF.js} +12 -41
  22. package/dist/chunk-ZG6SHKEF.js.map +1 -0
  23. package/dist/{http-UAXBI747.js → http-UHEXY3ZE.js} +2 -2
  24. package/dist/{http-EIX65EBE.js → http-VGZFZ3DQ.js} +2 -2
  25. package/dist/index.cjs +37 -7
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +4 -4
  30. package/dist/node.cjs +37 -7
  31. package/dist/node.cjs.map +1 -1
  32. package/dist/node.js +4 -4
  33. package/dist/{replay-EVDUMCAS.js → replay-NJ7VOSPW.js} +3 -3
  34. package/dist/{replay-U65EXYUR.js → replay-R3EIGP7F.js} +3 -3
  35. package/dist/replayCli.js +3 -3
  36. package/dist/seedCli.js +3 -3
  37. package/dist/transform/babel.cjs +11 -40
  38. package/dist/transform/babel.cjs.map +1 -1
  39. package/dist/transform/babel.js +1 -1
  40. package/dist/transform/bun.cjs +11 -40
  41. package/dist/transform/bun.cjs.map +1 -1
  42. package/dist/transform/bun.js +3 -3
  43. package/dist/transform/esbuild.cjs +11 -40
  44. package/dist/transform/esbuild.cjs.map +1 -1
  45. package/dist/transform/esbuild.js +3 -3
  46. package/dist/transform/loaderRuntime.cjs +11 -40
  47. package/dist/transform/loaderRuntime.cjs.map +1 -1
  48. package/dist/transform/loaderRuntime.js +2 -2
  49. package/dist/transform/nest.cjs +11 -40
  50. package/dist/transform/nest.cjs.map +1 -1
  51. package/dist/transform/nest.js +3 -3
  52. package/dist/transform/next.cjs +11 -40
  53. package/dist/transform/next.cjs.map +1 -1
  54. package/dist/transform/next.js +3 -3
  55. package/dist/transform/nodeLoader.js +11 -40
  56. package/dist/transform/nodeLoader.js.map +1 -1
  57. package/dist/transform/rolldown.cjs +11 -40
  58. package/dist/transform/rolldown.cjs.map +1 -1
  59. package/dist/transform/rolldown.js +3 -3
  60. package/dist/transform/rollup.cjs +11 -40
  61. package/dist/transform/rollup.cjs.map +1 -1
  62. package/dist/transform/rollup.js +3 -3
  63. package/dist/transform/rsbuild.cjs +11 -40
  64. package/dist/transform/rsbuild.cjs.map +1 -1
  65. package/dist/transform/rsbuild.js +3 -3
  66. package/dist/transform/rspack.cjs +11 -40
  67. package/dist/transform/rspack.cjs.map +1 -1
  68. package/dist/transform/rspack.js +3 -3
  69. package/dist/transform/swc.cjs +11 -40
  70. package/dist/transform/swc.cjs.map +1 -1
  71. package/dist/transform/swc.js +2 -2
  72. package/dist/transform/unplugin.cjs +11 -40
  73. package/dist/transform/unplugin.cjs.map +1 -1
  74. package/dist/transform/unplugin.js +3 -3
  75. package/dist/transform/vite.cjs +11 -40
  76. package/dist/transform/vite.cjs.map +1 -1
  77. package/dist/transform/vite.js +3 -3
  78. package/dist/transform/webpack.cjs +11 -40
  79. package/dist/transform/webpack.cjs.map +1 -1
  80. package/dist/transform/webpack.js +3 -3
  81. package/package.json +11 -11
  82. package/dist/chunk-6FFC55V5.js.map +0 -1
  83. package/dist/chunk-BTCULORS.js.map +0 -1
  84. package/dist/chunk-GSHCHCB5.js.map +0 -1
  85. package/dist/chunk-YWXQM6J3.js.map +0 -1
  86. /package/dist/{chunk-CYF5LGHB.js.map → chunk-CL66KPSI.js.map} +0 -0
  87. /package/dist/{chunk-2A4MMF2B.js.map → chunk-NMPHLDEG.js.map} +0 -0
  88. /package/dist/{chunk-MN3E2RUU.js.map → chunk-PTCLRG4E.js.map} +0 -0
  89. /package/dist/{chunk-IBWW3SP4.js.map → chunk-YVJAOGHE.js.map} +0 -0
  90. /package/dist/{http-EIX65EBE.js.map → http-UHEXY3ZE.js.map} +0 -0
  91. /package/dist/{http-UAXBI747.js.map → http-VGZFZ3DQ.js.map} +0 -0
  92. /package/dist/{replay-EVDUMCAS.js.map → replay-NJ7VOSPW.js.map} +0 -0
  93. /package/dist/{replay-U65EXYUR.js.map → replay-R3EIGP7F.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -4284,7 +4284,7 @@ interface CommitRef {
4284
4284
  /**
4285
4285
  * SDK version from package.json (injected at build time)
4286
4286
  */
4287
- declare const __version__ = "0.65.0";
4287
+ declare const __version__ = "0.65.3";
4288
4288
 
4289
4289
  /**
4290
4290
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -4284,7 +4284,7 @@ interface CommitRef {
4284
4284
  /**
4285
4285
  * SDK version from package.json (injected at build time)
4286
4286
  */
4287
- declare const __version__ = "0.65.0";
4287
+ declare const __version__ = "0.65.3";
4288
4288
 
4289
4289
  /**
4290
4290
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -38,8 +38,8 @@ import {
38
38
  getCurrentTrace,
39
39
  reseedFromRegistry,
40
40
  seedFromRegistry
41
- } from "./chunk-BTCULORS.js";
42
- import "./chunk-YWXQM6J3.js";
41
+ } from "./chunk-SE73IWU6.js";
42
+ import "./chunk-QRNHRY7F.js";
43
43
  import {
44
44
  BITFAB_PROGRESS_PREFIX,
45
45
  DbBranchReplayError,
@@ -47,7 +47,7 @@ import {
47
47
  ReplayError,
48
48
  reportReplayProgress,
49
49
  serializeReplayResult
50
- } from "./chunk-2A4MMF2B.js";
50
+ } from "./chunk-NMPHLDEG.js";
51
51
  import {
52
52
  BitfabError,
53
53
  DEFAULT_SERVICE_URL,
@@ -55,7 +55,7 @@ import {
55
55
  MixedTracingError,
56
56
  __version__,
57
57
  flushTraces
58
- } from "./chunk-UKQOBPTJ.js";
58
+ } from "./chunk-MPZBAVVQ.js";
59
59
  import "./chunk-MT36GJMW.js";
60
60
  export {
61
61
  AssertionCategoriesClient,
package/dist/node.cjs CHANGED
@@ -97,7 +97,7 @@ var __version__, __packageName__;
97
97
  var init_version_generated = __esm({
98
98
  "src/version.generated.ts"() {
99
99
  "use strict";
100
- __version__ = "0.65.0";
100
+ __version__ = "0.65.3";
101
101
  __packageName__ = "bitfab";
102
102
  }
103
103
  });
@@ -6159,6 +6159,21 @@ function runWithAutoTraceNodeConfiguration(nodeConfiguration, fn) {
6159
6159
  }
6160
6160
  return result;
6161
6161
  }
6162
+ function runAsAutoTraceRootFunction(functionName, fn) {
6163
+ const scope = currentAutoTraceScope();
6164
+ if (!scope || scope.entries.length === 0 || functionName === "") {
6165
+ return fn();
6166
+ }
6167
+ const rootFunction = {
6168
+ name: functionName,
6169
+ entering: true
6170
+ };
6171
+ try {
6172
+ return runWithAutoTraceScope({ ...scope, rootFunction }, fn);
6173
+ } finally {
6174
+ rootFunction.entering = false;
6175
+ }
6176
+ }
6162
6177
  var SUBTREE_TRACING_DOCS_URL = "https://docs.bitfab.ai/typescript-sdk#experimental-subtree-tracing";
6163
6178
  function transformInstalled() {
6164
6179
  return autoTraceGlobal.__bitfab_auto_trace_transformed_v1__ === true;
@@ -10067,6 +10082,11 @@ function readBooleanEnv(name) {
10067
10082
  );
10068
10083
  return void 0;
10069
10084
  }
10085
+ var AUTO_TRACE_NODE_FUNCTION_NAMES = /* @__PURE__ */ new WeakMap();
10086
+ function registerAutoTraceNode(configured, functionName) {
10087
+ AUTO_TRACE_NODE_FUNCTION_NAMES.set(configured, functionName);
10088
+ return configured;
10089
+ }
10070
10090
  var DEFAULT_AUTO_TRACE_MAX_DEPTH = 30;
10071
10091
  var DEFAULT_AUTO_TRACE_MAX_CAPTURED_SUBTREE_SPANS = 500;
10072
10092
  function spanOwnerName(receiver) {
@@ -10202,7 +10222,13 @@ var Bitfab = class {
10202
10222
  throw new BitfabError("bitfab.withTrace requires a function");
10203
10223
  }
10204
10224
  const name = fn.name !== "" ? fn.name : traceFunctionKey;
10205
- return this.createAutoTraceRoot(traceFunctionKey, name, options, fn);
10225
+ return this.createAutoTraceRoot(
10226
+ traceFunctionKey,
10227
+ name,
10228
+ options,
10229
+ fn,
10230
+ AUTO_TRACE_NODE_FUNCTION_NAMES.get(fn) ?? fn.name.replace(/^bound /, "")
10231
+ );
10206
10232
  }
10207
10233
  /**
10208
10234
  * Configure a transformed class method when it is discovered beneath a
@@ -10283,7 +10309,7 @@ var Bitfab = class {
10283
10309
  }
10284
10310
  createAutoTraceNode(configuration, fn, functionName) {
10285
10311
  const nodeConfiguration = { ...configuration, functionName };
10286
- return function(...args) {
10312
+ return registerAutoTraceNode(function(...args) {
10287
10313
  if (!__bitfabAutoTraceActive()) {
10288
10314
  if (enclosingSurface() === "opt-in") {
10289
10315
  throw mixedTracingError("node()", "opt-out", "opt-in");
@@ -10294,11 +10320,15 @@ var Bitfab = class {
10294
10320
  nodeConfiguration,
10295
10321
  () => fn.apply(this, args)
10296
10322
  );
10297
- };
10323
+ }, functionName);
10298
10324
  }
10299
- createAutoTraceRoot(traceFunctionKey, name, options, fn) {
10325
+ createAutoTraceRoot(traceFunctionKey, name, options, fn, rootFunctionName = "") {
10300
10326
  const self = this;
10301
10327
  self.simulationPlan.refresh();
10328
+ const runRootFunction = (receiver, args) => runAsAutoTraceRootFunction(
10329
+ rootFunctionName,
10330
+ () => fn.apply(receiver, args)
10331
+ );
10302
10332
  const maxDepth = autoTraceLimit(
10303
10333
  options.maxDepth,
10304
10334
  DEFAULT_AUTO_TRACE_MAX_DEPTH
@@ -10461,7 +10491,7 @@ var Bitfab = class {
10461
10491
  return runWithAutoTraceRootContext(
10462
10492
  autoTraceContext,
10463
10493
  getSpanStack(),
10464
- () => fn.apply(this, args)
10494
+ () => runRootFunction(this, args)
10465
10495
  );
10466
10496
  }
10467
10497
  );
@@ -10494,7 +10524,7 @@ var Bitfab = class {
10494
10524
  ),
10495
10525
  () => {
10496
10526
  if (link === void 0) {
10497
- return fn.apply(this, args);
10527
+ return runRootFunction(this, args);
10498
10528
  }
10499
10529
  const innermost = enclosing[enclosing.length - 1];
10500
10530
  const innermostNow = currentAutoTraceEntries().find(