@bitfab/sdk 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
@@ -14,7 +14,7 @@ import {
14
14
  flushTraces,
15
15
  getCurrentSpan,
16
16
  getCurrentTrace
17
- } from "./chunk-VQ4GMKQ7.js";
17
+ } from "./chunk-SK4TNXRC.js";
18
18
  import {
19
19
  BITFAB_PROGRESS_PREFIX,
20
20
  BitfabError,
package/dist/node.cjs CHANGED
@@ -697,7 +697,7 @@ registerAsyncLocalStorageClass(
697
697
  );
698
698
 
699
699
  // src/version.generated.ts
700
- var __version__ = "0.28.9";
700
+ var __version__ = "0.28.10";
701
701
 
702
702
  // src/constants.ts
703
703
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -3143,8 +3143,11 @@ init_warnOnce();
3143
3143
  var activeTraceStates = /* @__PURE__ */ new Map();
3144
3144
  var pendingSpanPromises = /* @__PURE__ */ new Map();
3145
3145
  var asyncLocalStorage = null;
3146
+ var initializeAsyncContext = () => {
3147
+ asyncLocalStorage ?? (asyncLocalStorage = createAsyncLocalStorage());
3148
+ };
3146
3149
  var asyncLocalStorageReady = asyncStorageReady.then(() => {
3147
- asyncLocalStorage = createAsyncLocalStorage();
3150
+ initializeAsyncContext();
3148
3151
  });
3149
3152
  var browserSpanStack = [];
3150
3153
  function getSpanStack() {
@@ -3913,6 +3916,7 @@ var Bitfab = class {
3913
3916
  if (!self.isTracingEnabled()) {
3914
3917
  return fn.apply(this, args);
3915
3918
  }
3919
+ initializeAsyncContext();
3916
3920
  if (!asyncLocalStorage && !isAsyncStorageInitDone()) {
3917
3921
  return asyncLocalStorageReady.then(
3918
3922
  () => wrappedFn.apply(this, args)