@bitfab/sdk 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.
- package/cloudReplay.py +207 -30
- package/dist/autoTrace.cjs +28 -0
- package/dist/autoTrace.cjs.map +1 -1
- package/dist/autoTrace.d.cts +2 -1
- package/dist/autoTrace.d.ts +2 -1
- package/dist/autoTrace.js +3 -1
- package/dist/{chunk-3W6RLPGK.js → chunk-BRMGNMDO.js} +4 -4
- package/dist/chunk-BRMGNMDO.js.map +1 -0
- package/dist/{chunk-WW2RMMTA.js → chunk-CLP2L5PU.js} +2 -2
- package/dist/{chunk-WW2RMMTA.js.map → chunk-CLP2L5PU.js.map} +1 -1
- package/dist/{chunk-JIGT4NC5.js → chunk-HLH7TN2A.js} +2 -2
- package/dist/{chunk-TNIJXUGC.js → chunk-LCV2JYXL.js} +2 -2
- package/dist/{chunk-TNIJXUGC.js.map → chunk-LCV2JYXL.js.map} +1 -1
- package/dist/{chunk-SUXEIG4U.js → chunk-NRE5CJPR.js} +29 -13
- package/dist/chunk-NRE5CJPR.js.map +1 -0
- package/dist/{chunk-MN3E2RUU.js → chunk-PTCLRG4E.js} +3 -3
- package/dist/{chunk-YWXQM6J3.js → chunk-QRNHRY7F.js} +28 -1
- package/dist/chunk-QRNHRY7F.js.map +1 -0
- package/dist/{chunk-IBWW3SP4.js → chunk-YVJAOGHE.js} +2 -2
- package/dist/{chunk-JXIW4FOF.js → chunk-Z26K57WZ.js} +2 -2
- package/dist/{chunk-GSHCHCB5.js → chunk-ZG6SHKEF.js} +12 -41
- package/dist/chunk-ZG6SHKEF.js.map +1 -0
- package/dist/{http-7LTYEMJO.js → http-VN52X47M.js} +2 -2
- package/dist/{http-NNVOMI63.js → http-WP4YPPKC.js} +2 -2
- package/dist/index.cjs +37 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/node.cjs +37 -7
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +4 -4
- package/dist/{replay-D7AN6O25.js → replay-463SEV53.js} +3 -3
- package/dist/{replay-L56SESG7.js → replay-OT4A4HVF.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/seedCli.js +3 -3
- package/dist/transform/babel.cjs +11 -40
- package/dist/transform/babel.cjs.map +1 -1
- package/dist/transform/babel.js +1 -1
- package/dist/transform/bun.cjs +11 -40
- package/dist/transform/bun.cjs.map +1 -1
- package/dist/transform/bun.js +3 -3
- package/dist/transform/esbuild.cjs +11 -40
- package/dist/transform/esbuild.cjs.map +1 -1
- package/dist/transform/esbuild.js +3 -3
- package/dist/transform/loaderRuntime.cjs +11 -40
- package/dist/transform/loaderRuntime.cjs.map +1 -1
- package/dist/transform/loaderRuntime.js +2 -2
- package/dist/transform/nest.cjs +11 -40
- package/dist/transform/nest.cjs.map +1 -1
- package/dist/transform/nest.js +3 -3
- package/dist/transform/next.cjs +11 -40
- package/dist/transform/next.cjs.map +1 -1
- package/dist/transform/next.js +3 -3
- package/dist/transform/nodeLoader.js +11 -40
- package/dist/transform/nodeLoader.js.map +1 -1
- package/dist/transform/rolldown.cjs +11 -40
- package/dist/transform/rolldown.cjs.map +1 -1
- package/dist/transform/rolldown.js +3 -3
- package/dist/transform/rollup.cjs +11 -40
- package/dist/transform/rollup.cjs.map +1 -1
- package/dist/transform/rollup.js +3 -3
- package/dist/transform/rsbuild.cjs +11 -40
- package/dist/transform/rsbuild.cjs.map +1 -1
- package/dist/transform/rsbuild.js +3 -3
- package/dist/transform/rspack.cjs +11 -40
- package/dist/transform/rspack.cjs.map +1 -1
- package/dist/transform/rspack.js +3 -3
- package/dist/transform/swc.cjs +11 -40
- package/dist/transform/swc.cjs.map +1 -1
- package/dist/transform/swc.js +2 -2
- package/dist/transform/unplugin.cjs +11 -40
- package/dist/transform/unplugin.cjs.map +1 -1
- package/dist/transform/unplugin.js +3 -3
- package/dist/transform/vite.cjs +11 -40
- package/dist/transform/vite.cjs.map +1 -1
- package/dist/transform/vite.js +3 -3
- package/dist/transform/webpack.cjs +11 -40
- package/dist/transform/webpack.cjs.map +1 -1
- package/dist/transform/webpack.js +3 -3
- package/package.json +11 -11
- package/dist/chunk-3W6RLPGK.js.map +0 -1
- package/dist/chunk-GSHCHCB5.js.map +0 -1
- package/dist/chunk-SUXEIG4U.js.map +0 -1
- package/dist/chunk-YWXQM6J3.js.map +0 -1
- /package/dist/{chunk-JIGT4NC5.js.map → chunk-HLH7TN2A.js.map} +0 -0
- /package/dist/{chunk-MN3E2RUU.js.map → chunk-PTCLRG4E.js.map} +0 -0
- /package/dist/{chunk-IBWW3SP4.js.map → chunk-YVJAOGHE.js.map} +0 -0
- /package/dist/{chunk-JXIW4FOF.js.map → chunk-Z26K57WZ.js.map} +0 -0
- /package/dist/{http-7LTYEMJO.js.map → http-VN52X47M.js.map} +0 -0
- /package/dist/{http-NNVOMI63.js.map → http-WP4YPPKC.js.map} +0 -0
- /package/dist/{replay-D7AN6O25.js.map → replay-463SEV53.js.map} +0 -0
- /package/dist/{replay-L56SESG7.js.map → replay-OT4A4HVF.js.map} +0 -0
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
clearAutoTraceNodeConfiguration,
|
|
4
4
|
currentAutoTraceEntries,
|
|
5
5
|
invokeThroughAutoTraceEntries,
|
|
6
|
+
runAsAutoTraceRootFunction,
|
|
6
7
|
runWithAutoTraceEntry,
|
|
7
8
|
runWithAutoTraceNodeConfiguration,
|
|
8
9
|
runWithAutoTraceRootContext
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QRNHRY7F.js";
|
|
10
11
|
import {
|
|
11
12
|
NO_MOCK_OVERRIDE,
|
|
12
13
|
createIntegrationFixtureContext,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
serializeValue,
|
|
18
19
|
toJsonSafe,
|
|
19
20
|
toJsonSafeReport
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HLH7TN2A.js";
|
|
21
22
|
import {
|
|
22
23
|
BitfabError,
|
|
23
24
|
CONTENT_OFF_KEY,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
readEnv,
|
|
38
39
|
recordCallerTraceMetadata,
|
|
39
40
|
retireTraceMetadata
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LCV2JYXL.js";
|
|
41
42
|
import {
|
|
42
43
|
__privateAdd,
|
|
43
44
|
__privateGet,
|
|
@@ -4457,6 +4458,11 @@ function readBooleanEnv(name) {
|
|
|
4457
4458
|
);
|
|
4458
4459
|
return void 0;
|
|
4459
4460
|
}
|
|
4461
|
+
var AUTO_TRACE_NODE_FUNCTION_NAMES = /* @__PURE__ */ new WeakMap();
|
|
4462
|
+
function registerAutoTraceNode(configured, functionName) {
|
|
4463
|
+
AUTO_TRACE_NODE_FUNCTION_NAMES.set(configured, functionName);
|
|
4464
|
+
return configured;
|
|
4465
|
+
}
|
|
4460
4466
|
var DEFAULT_AUTO_TRACE_MAX_DEPTH = 30;
|
|
4461
4467
|
var DEFAULT_AUTO_TRACE_MAX_CAPTURED_SUBTREE_SPANS = 500;
|
|
4462
4468
|
function spanOwnerName(receiver) {
|
|
@@ -4592,7 +4598,13 @@ var Bitfab = class {
|
|
|
4592
4598
|
throw new BitfabError("bitfab.withTrace requires a function");
|
|
4593
4599
|
}
|
|
4594
4600
|
const name = fn.name !== "" ? fn.name : traceFunctionKey;
|
|
4595
|
-
return this.createAutoTraceRoot(
|
|
4601
|
+
return this.createAutoTraceRoot(
|
|
4602
|
+
traceFunctionKey,
|
|
4603
|
+
name,
|
|
4604
|
+
options,
|
|
4605
|
+
fn,
|
|
4606
|
+
AUTO_TRACE_NODE_FUNCTION_NAMES.get(fn) ?? fn.name.replace(/^bound /, "")
|
|
4607
|
+
);
|
|
4596
4608
|
}
|
|
4597
4609
|
/**
|
|
4598
4610
|
* Configure a transformed class method when it is discovered beneath a
|
|
@@ -4673,7 +4685,7 @@ var Bitfab = class {
|
|
|
4673
4685
|
}
|
|
4674
4686
|
createAutoTraceNode(configuration, fn, functionName) {
|
|
4675
4687
|
const nodeConfiguration = { ...configuration, functionName };
|
|
4676
|
-
return function(...args) {
|
|
4688
|
+
return registerAutoTraceNode(function(...args) {
|
|
4677
4689
|
if (!__bitfabAutoTraceActive()) {
|
|
4678
4690
|
if (enclosingSurface() === "opt-in") {
|
|
4679
4691
|
throw mixedTracingError("node()", "opt-out", "opt-in");
|
|
@@ -4684,11 +4696,15 @@ var Bitfab = class {
|
|
|
4684
4696
|
nodeConfiguration,
|
|
4685
4697
|
() => fn.apply(this, args)
|
|
4686
4698
|
);
|
|
4687
|
-
};
|
|
4699
|
+
}, functionName);
|
|
4688
4700
|
}
|
|
4689
|
-
createAutoTraceRoot(traceFunctionKey, name, options, fn) {
|
|
4701
|
+
createAutoTraceRoot(traceFunctionKey, name, options, fn, rootFunctionName = "") {
|
|
4690
4702
|
const self = this;
|
|
4691
4703
|
self.simulationPlan.refresh();
|
|
4704
|
+
const runRootFunction = (receiver, args) => runAsAutoTraceRootFunction(
|
|
4705
|
+
rootFunctionName,
|
|
4706
|
+
() => fn.apply(receiver, args)
|
|
4707
|
+
);
|
|
4692
4708
|
const maxDepth = autoTraceLimit(
|
|
4693
4709
|
options.maxDepth,
|
|
4694
4710
|
DEFAULT_AUTO_TRACE_MAX_DEPTH
|
|
@@ -4851,7 +4867,7 @@ var Bitfab = class {
|
|
|
4851
4867
|
return runWithAutoTraceRootContext(
|
|
4852
4868
|
autoTraceContext,
|
|
4853
4869
|
getSpanStack(),
|
|
4854
|
-
() =>
|
|
4870
|
+
() => runRootFunction(this, args)
|
|
4855
4871
|
);
|
|
4856
4872
|
}
|
|
4857
4873
|
);
|
|
@@ -4884,7 +4900,7 @@ var Bitfab = class {
|
|
|
4884
4900
|
),
|
|
4885
4901
|
() => {
|
|
4886
4902
|
if (link === void 0) {
|
|
4887
|
-
return
|
|
4903
|
+
return runRootFunction(this, args);
|
|
4888
4904
|
}
|
|
4889
4905
|
const innermost = enclosing[enclosing.length - 1];
|
|
4890
4906
|
const innermostNow = currentAutoTraceEntries().find(
|
|
@@ -6403,7 +6419,7 @@ var Bitfab = class {
|
|
|
6403
6419
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
6404
6420
|
} finally {
|
|
6405
6421
|
try {
|
|
6406
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
6422
|
+
const { flushTraces: flushTraces2 } = await import("./http-VN52X47M.js");
|
|
6407
6423
|
await flushTraces2(3e4);
|
|
6408
6424
|
} finally {
|
|
6409
6425
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -6462,7 +6478,7 @@ var Bitfab = class {
|
|
|
6462
6478
|
`Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
|
|
6463
6479
|
);
|
|
6464
6480
|
}
|
|
6465
|
-
const { replay: doReplay } = await import("./replay-
|
|
6481
|
+
const { replay: doReplay } = await import("./replay-OT4A4HVF.js");
|
|
6466
6482
|
return doReplay(
|
|
6467
6483
|
this.httpClient,
|
|
6468
6484
|
this.serviceUrl,
|
|
@@ -6808,7 +6824,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
6808
6824
|
sessionId: seedCase.sessionId
|
|
6809
6825
|
})
|
|
6810
6826
|
);
|
|
6811
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
6827
|
+
const { flushTraces: flushTraces2 } = await import("./http-VN52X47M.js");
|
|
6812
6828
|
await flushTraces2(3e4);
|
|
6813
6829
|
return { pipeline, traceFunctionKey, traceIds };
|
|
6814
6830
|
}
|
|
@@ -6855,4 +6871,4 @@ export {
|
|
|
6855
6871
|
reseedFromRegistry,
|
|
6856
6872
|
seedFromRegistry
|
|
6857
6873
|
};
|
|
6858
|
-
//# sourceMappingURL=chunk-
|
|
6874
|
+
//# sourceMappingURL=chunk-NRE5CJPR.js.map
|