bitfab 0.28.9 → 0.28.10

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/index.d.cts CHANGED
@@ -1614,7 +1614,7 @@ declare class BitfabFunction {
1614
1614
  /**
1615
1615
  * SDK version from package.json (injected at build time)
1616
1616
  */
1617
- declare const __version__ = "0.28.9";
1617
+ declare const __version__ = "0.28.10";
1618
1618
 
1619
1619
  /**
1620
1620
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -1614,7 +1614,7 @@ declare class BitfabFunction {
1614
1614
  /**
1615
1615
  * SDK version from package.json (injected at build time)
1616
1616
  */
1617
- declare const __version__ = "0.28.9";
1617
+ declare const __version__ = "0.28.10";
1618
1618
 
1619
1619
  /**
1620
1620
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  flushTraces,
24
24
  getCurrentSpan,
25
25
  getCurrentTrace
26
- } from "./chunk-VQ4GMKQ7.js";
26
+ } from "./chunk-SK4TNXRC.js";
27
27
  import {
28
28
  BITFAB_PROGRESS_PREFIX,
29
29
  BitfabError,
package/dist/node.cjs CHANGED
@@ -706,7 +706,7 @@ registerAsyncLocalStorageClass(
706
706
  );
707
707
 
708
708
  // src/version.generated.ts
709
- var __version__ = "0.28.9";
709
+ var __version__ = "0.28.10";
710
710
 
711
711
  // src/constants.ts
712
712
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -3152,8 +3152,11 @@ init_warnOnce();
3152
3152
  var activeTraceStates = /* @__PURE__ */ new Map();
3153
3153
  var pendingSpanPromises = /* @__PURE__ */ new Map();
3154
3154
  var asyncLocalStorage = null;
3155
+ var initializeAsyncContext = () => {
3156
+ asyncLocalStorage ?? (asyncLocalStorage = createAsyncLocalStorage());
3157
+ };
3155
3158
  var asyncLocalStorageReady = asyncStorageReady.then(() => {
3156
- asyncLocalStorage = createAsyncLocalStorage();
3159
+ initializeAsyncContext();
3157
3160
  });
3158
3161
  var browserSpanStack = [];
3159
3162
  function getSpanStack() {
@@ -3922,6 +3925,7 @@ var Bitfab = class {
3922
3925
  if (!self.isTracingEnabled()) {
3923
3926
  return fn.apply(this, args);
3924
3927
  }
3928
+ initializeAsyncContext();
3925
3929
  if (!asyncLocalStorage && !isAsyncStorageInitDone()) {
3926
3930
  return asyncLocalStorageReady.then(
3927
3931
  () => wrappedFn.apply(this, args)