bitfab 0.33.2 → 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-GT2GSQM2.js → chunk-HWQB73HK.js} +5 -3
- package/dist/chunk-HWQB73HK.js.map +1 -0
- package/dist/{chunk-A3WLV5VS.js → chunk-OMW6EFXC.js} +36 -4
- package/dist/chunk-OMW6EFXC.js.map +1 -0
- package/dist/index.cjs +37 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -5
- package/dist/index.d.ts +24 -5
- package/dist/index.js +2 -2
- package/dist/node.cjs +37 -3
- 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 +2 -2
- package/dist/{replay-V4GLDFSU.js → replay-4Y23OZYE.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-A3WLV5VS.js.map +0 -1
- package/dist/chunk-GT2GSQM2.js.map +0 -1
- /package/dist/{replay-V4GLDFSU.js.map → replay-4Y23OZYE.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -799,11 +799,13 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
799
799
|
await replayContextReady;
|
|
800
800
|
let codeChangeDescription = options?.codeChangeDescription;
|
|
801
801
|
let codeChangeFiles = options?.codeChangeFiles;
|
|
802
|
-
if (
|
|
802
|
+
if (codeChangeFiles === void 0) {
|
|
803
803
|
const captured = await resolveAutoCodeChange(options?.name);
|
|
804
804
|
if (captured) {
|
|
805
|
-
codeChangeDescription = captured.description;
|
|
806
805
|
codeChangeFiles = captured.files;
|
|
806
|
+
if (codeChangeDescription === void 0) {
|
|
807
|
+
codeChangeDescription = captured.description;
|
|
808
|
+
}
|
|
807
809
|
}
|
|
808
810
|
}
|
|
809
811
|
const {
|
|
@@ -1012,7 +1014,7 @@ __export(index_exports, {
|
|
|
1012
1014
|
module.exports = __toCommonJS(index_exports);
|
|
1013
1015
|
|
|
1014
1016
|
// src/version.generated.ts
|
|
1015
|
-
var __version__ = "0.33.
|
|
1017
|
+
var __version__ = "0.33.4";
|
|
1016
1018
|
|
|
1017
1019
|
// src/constants.ts
|
|
1018
1020
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
@@ -4311,6 +4313,38 @@ var Bitfab = class {
|
|
|
4311
4313
|
() => wrappedFn.apply(this, args)
|
|
4312
4314
|
);
|
|
4313
4315
|
}
|
|
4316
|
+
const captureWhen = options.captureWhen === void 0 ? "always" : options.captureWhen;
|
|
4317
|
+
const resolvedCaptureWhen = captureWhen === "always" || captureWhen === "nested" ? captureWhen : "always";
|
|
4318
|
+
if (resolvedCaptureWhen !== captureWhen) {
|
|
4319
|
+
let invalidValue;
|
|
4320
|
+
try {
|
|
4321
|
+
invalidValue = String(captureWhen);
|
|
4322
|
+
} catch {
|
|
4323
|
+
invalidValue = "<unprintable>";
|
|
4324
|
+
}
|
|
4325
|
+
warnOnce(
|
|
4326
|
+
`invalid-capture-when:${traceFunctionKey}`,
|
|
4327
|
+
`unknown captureWhen value "${invalidValue}"; defaulting to "always". Valid values: "always", "nested".`
|
|
4328
|
+
);
|
|
4329
|
+
}
|
|
4330
|
+
if (resolvedCaptureWhen === "nested") {
|
|
4331
|
+
let hasParent = false;
|
|
4332
|
+
try {
|
|
4333
|
+
hasParent = getSpanStack().length > 0;
|
|
4334
|
+
} catch (setupError) {
|
|
4335
|
+
if (getReplayContext()) {
|
|
4336
|
+
throw setupError;
|
|
4337
|
+
}
|
|
4338
|
+
warnOnce(
|
|
4339
|
+
`withSpan-setup:${traceFunctionKey}`,
|
|
4340
|
+
`tracing setup failed for "${traceFunctionKey}"; running it untraced. The function still runs and returns normally; no span is recorded.`
|
|
4341
|
+
);
|
|
4342
|
+
return fn.apply(this, args);
|
|
4343
|
+
}
|
|
4344
|
+
if (!hasParent) {
|
|
4345
|
+
return fn.apply(this, args);
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4314
4348
|
let newStack;
|
|
4315
4349
|
let executeWithContext;
|
|
4316
4350
|
let registeredTraceId;
|