@bitfab/sdk 0.64.0 → 0.64.2
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 +5 -24
- package/dist/{chunk-KWEBQUSI.js → chunk-F5E4FJM4.js} +50 -16
- package/dist/chunk-F5E4FJM4.js.map +1 -0
- package/dist/{chunk-KBKRGLUG.js → chunk-L6BOQR2Q.js} +52 -4
- package/dist/{chunk-KBKRGLUG.js.map → chunk-L6BOQR2Q.js.map} +1 -1
- package/dist/{chunk-QIIJTT4P.js → chunk-NZBKTVEZ.js} +2 -2
- package/dist/{chunk-MFN5DXSW.js → chunk-O7BR6N3G.js} +3 -2
- package/dist/{chunk-MFN5DXSW.js.map → chunk-O7BR6N3G.js.map} +1 -1
- package/dist/{chunk-SZ64CZC2.js → chunk-YM4CEDSB.js} +2 -2
- package/dist/{chunk-SZ64CZC2.js.map → chunk-YM4CEDSB.js.map} +1 -1
- package/dist/{http-E33BMAHV.js → http-7B5TPJ6F.js} +2 -2
- package/dist/{http-72TTBUFP.js → http-TVPWBP7C.js} +2 -2
- package/dist/index.cjs +46 -11
- 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 +3 -3
- package/dist/node.cjs +46 -11
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-6H6K4DRN.js → replay-3C5KEHVO.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-KWEBQUSI.js.map +0 -1
- /package/dist/{chunk-QIIJTT4P.js.map → chunk-NZBKTVEZ.js.map} +0 -0
- /package/dist/{http-72TTBUFP.js.map → http-7B5TPJ6F.js.map} +0 -0
- /package/dist/{http-E33BMAHV.js.map → http-TVPWBP7C.js.map} +0 -0
- /package/dist/{replay-6H6K4DRN.js.map → replay-3C5KEHVO.js.map} +0 -0
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
getCurrentTrace,
|
|
28
28
|
reseedFromRegistry,
|
|
29
29
|
seedFromRegistry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-F5E4FJM4.js";
|
|
31
31
|
import "./chunk-YWXQM6J3.js";
|
|
32
32
|
import {
|
|
33
33
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
ReplayError,
|
|
37
37
|
reportReplayProgress,
|
|
38
38
|
serializeReplayResult
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NZBKTVEZ.js";
|
|
40
40
|
import {
|
|
41
41
|
BitfabError,
|
|
42
42
|
DEFAULT_SERVICE_URL,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
MixedTracingError,
|
|
45
45
|
__version__,
|
|
46
46
|
flushTraces
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YM4CEDSB.js";
|
|
48
48
|
import "./chunk-MT36GJMW.js";
|
|
49
49
|
export {
|
|
50
50
|
AssertionCategoriesClient,
|
package/dist/node.cjs
CHANGED
|
@@ -88,7 +88,7 @@ var __version__, __packageName__;
|
|
|
88
88
|
var init_version_generated = __esm({
|
|
89
89
|
"src/version.generated.ts"() {
|
|
90
90
|
"use strict";
|
|
91
|
-
__version__ = "0.64.
|
|
91
|
+
__version__ = "0.64.2";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -9291,6 +9291,22 @@ var BitfabVercelAiHandler = class {
|
|
|
9291
9291
|
|
|
9292
9292
|
// src/client.ts
|
|
9293
9293
|
init_warnOnce();
|
|
9294
|
+
function markTracedFunction(target, traceFunctionKey, original) {
|
|
9295
|
+
Object.defineProperty(target, "_bitfabTraceFunctionKey", {
|
|
9296
|
+
value: traceFunctionKey
|
|
9297
|
+
});
|
|
9298
|
+
Object.defineProperty(target, "_bitfabWrappedFn", { value: original });
|
|
9299
|
+
Object.defineProperty(target, "bind", {
|
|
9300
|
+
value(thisArg, ...boundArgs) {
|
|
9301
|
+
return markTracedFunction(
|
|
9302
|
+
Function.prototype.bind.call(this, thisArg, ...boundArgs),
|
|
9303
|
+
traceFunctionKey,
|
|
9304
|
+
original
|
|
9305
|
+
);
|
|
9306
|
+
}
|
|
9307
|
+
});
|
|
9308
|
+
return target;
|
|
9309
|
+
}
|
|
9294
9310
|
function resolveSpanExperimentId(options) {
|
|
9295
9311
|
const { experimentId, testRunId } = options;
|
|
9296
9312
|
if (experimentId !== void 0 && testRunId !== void 0 && experimentId !== testRunId) {
|
|
@@ -10141,11 +10157,7 @@ var Bitfab = class {
|
|
|
10141
10157
|
}
|
|
10142
10158
|
);
|
|
10143
10159
|
};
|
|
10144
|
-
|
|
10145
|
-
value: traceFunctionKey
|
|
10146
|
-
});
|
|
10147
|
-
Object.defineProperty(autoTraceRoot, "_bitfabWrappedFn", { value: fn });
|
|
10148
|
-
return autoTraceRoot;
|
|
10160
|
+
return markTracedFunction(autoTraceRoot, traceFunctionKey, fn);
|
|
10149
10161
|
}
|
|
10150
10162
|
applySimulationPlan(payload, submit, drop) {
|
|
10151
10163
|
this.simulationPlan.send(
|
|
@@ -11160,11 +11172,7 @@ var Bitfab = class {
|
|
|
11160
11172
|
}
|
|
11161
11173
|
return runWithSpanStack(newStack, executeWithContext);
|
|
11162
11174
|
};
|
|
11163
|
-
|
|
11164
|
-
value: traceFunctionKey
|
|
11165
|
-
});
|
|
11166
|
-
Object.defineProperty(wrappedFn, "_bitfabWrappedFn", { value: fn });
|
|
11167
|
-
return wrappedFn;
|
|
11175
|
+
return markTracedFunction(wrappedFn, traceFunctionKey, fn);
|
|
11168
11176
|
}
|
|
11169
11177
|
/**
|
|
11170
11178
|
* Create a standard ECMAScript method decorator that records each invocation
|
|
@@ -11969,9 +11977,36 @@ init_replay();
|
|
|
11969
11977
|
init_errors();
|
|
11970
11978
|
init_replay();
|
|
11971
11979
|
init_replayInterrupt();
|
|
11980
|
+
init_warnOnce();
|
|
11972
11981
|
function defineReplayRegistry(registry) {
|
|
11982
|
+
validateReplayRegistry(registry);
|
|
11973
11983
|
return registry;
|
|
11974
11984
|
}
|
|
11985
|
+
var REGISTRATION_FIELDS = /* @__PURE__ */ new Set([
|
|
11986
|
+
"client",
|
|
11987
|
+
"fn",
|
|
11988
|
+
"traceFunctionKey",
|
|
11989
|
+
"options",
|
|
11990
|
+
"optionsFactory"
|
|
11991
|
+
]);
|
|
11992
|
+
function validateReplayRegistry(registry) {
|
|
11993
|
+
for (const [pipeline, registration] of Object.entries(registry)) {
|
|
11994
|
+
if (typeof registration !== "object" || registration === null) {
|
|
11995
|
+
throw new BitfabError(
|
|
11996
|
+
`Replay registry entry '${pipeline}' must be an object with client and fn.`
|
|
11997
|
+
);
|
|
11998
|
+
}
|
|
11999
|
+
const unknownFields = Object.keys(registration).filter(
|
|
12000
|
+
(field) => !REGISTRATION_FIELDS.has(field)
|
|
12001
|
+
);
|
|
12002
|
+
if (unknownFields.length > 0) {
|
|
12003
|
+
warnOnce(
|
|
12004
|
+
`replay-registry-unknown-fields:${pipeline}:${unknownFields.join(",")}`,
|
|
12005
|
+
`Replay registry entry '${pipeline}' has unknown field(s): ${unknownFields.join(", ")}. They are ignored. An entry takes client, fn, traceFunctionKey, options, and optionsFactory. Put replay options such as adaptInputs, mock, and mockOverride inside options. A later SDK release will reject unknown fields.`
|
|
12006
|
+
);
|
|
12007
|
+
}
|
|
12008
|
+
}
|
|
12009
|
+
}
|
|
11975
12010
|
async function reseedFromRegistry(registry, pipeline, traceIds) {
|
|
11976
12011
|
const registration = registry[pipeline];
|
|
11977
12012
|
if (registration === void 0) {
|