@bitfab/sdk 0.33.3 → 0.33.4
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/{chunk-NIFTE3J4.js → chunk-OMW6EFXC.js} +34 -2
- package/dist/{chunk-NIFTE3J4.js.map → chunk-OMW6EFXC.js.map} +1 -1
- package/dist/index.cjs +33 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +1 -1
- package/dist/node.cjs +33 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-HWQB73HK.js";
|
|
18
18
|
|
|
19
19
|
// src/version.generated.ts
|
|
20
|
-
var __version__ = "0.33.
|
|
20
|
+
var __version__ = "0.33.4";
|
|
21
21
|
|
|
22
22
|
// src/constants.ts
|
|
23
23
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
@@ -3290,6 +3290,38 @@ var Bitfab = class {
|
|
|
3290
3290
|
() => wrappedFn.apply(this, args)
|
|
3291
3291
|
);
|
|
3292
3292
|
}
|
|
3293
|
+
const captureWhen = options.captureWhen === void 0 ? "always" : options.captureWhen;
|
|
3294
|
+
const resolvedCaptureWhen = captureWhen === "always" || captureWhen === "nested" ? captureWhen : "always";
|
|
3295
|
+
if (resolvedCaptureWhen !== captureWhen) {
|
|
3296
|
+
let invalidValue;
|
|
3297
|
+
try {
|
|
3298
|
+
invalidValue = String(captureWhen);
|
|
3299
|
+
} catch {
|
|
3300
|
+
invalidValue = "<unprintable>";
|
|
3301
|
+
}
|
|
3302
|
+
warnOnce(
|
|
3303
|
+
`invalid-capture-when:${traceFunctionKey}`,
|
|
3304
|
+
`unknown captureWhen value "${invalidValue}"; defaulting to "always". Valid values: "always", "nested".`
|
|
3305
|
+
);
|
|
3306
|
+
}
|
|
3307
|
+
if (resolvedCaptureWhen === "nested") {
|
|
3308
|
+
let hasParent = false;
|
|
3309
|
+
try {
|
|
3310
|
+
hasParent = getSpanStack().length > 0;
|
|
3311
|
+
} catch (setupError) {
|
|
3312
|
+
if (getReplayContext()) {
|
|
3313
|
+
throw setupError;
|
|
3314
|
+
}
|
|
3315
|
+
warnOnce(
|
|
3316
|
+
`withSpan-setup:${traceFunctionKey}`,
|
|
3317
|
+
`tracing setup failed for "${traceFunctionKey}"; running it untraced. The function still runs and returns normally; no span is recorded.`
|
|
3318
|
+
);
|
|
3319
|
+
return fn.apply(this, args);
|
|
3320
|
+
}
|
|
3321
|
+
if (!hasParent) {
|
|
3322
|
+
return fn.apply(this, args);
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3293
3325
|
let newStack;
|
|
3294
3326
|
let executeWithContext;
|
|
3295
3327
|
let registeredTraceId;
|
|
@@ -4028,4 +4060,4 @@ export {
|
|
|
4028
4060
|
BitfabFunction,
|
|
4029
4061
|
finalizers
|
|
4030
4062
|
};
|
|
4031
|
-
//# sourceMappingURL=chunk-
|
|
4063
|
+
//# sourceMappingURL=chunk-OMW6EFXC.js.map
|