@bitfab/sdk 0.64.1 → 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/dist/{chunk-THEO6T6H.js → chunk-F5E4FJM4.js} +50 -16
- package/dist/chunk-F5E4FJM4.js.map +1 -0
- package/dist/{chunk-GQVPOLN7.js → chunk-L6BOQR2Q.js} +52 -4
- package/dist/{chunk-GQVPOLN7.js.map → chunk-L6BOQR2Q.js.map} +1 -1
- package/dist/{chunk-2XXG7HNH.js → chunk-NZBKTVEZ.js} +2 -2
- package/dist/{chunk-MO4NIW4T.js → chunk-O7BR6N3G.js} +3 -2
- package/dist/{chunk-MO4NIW4T.js.map → chunk-O7BR6N3G.js.map} +1 -1
- package/dist/{chunk-ALXL4OQU.js → chunk-YM4CEDSB.js} +2 -2
- package/dist/{chunk-ALXL4OQU.js.map → chunk-YM4CEDSB.js.map} +1 -1
- package/dist/{http-4DI4LQCX.js → http-7B5TPJ6F.js} +2 -2
- package/dist/{http-B632MJBF.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-UXFZNGGI.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-THEO6T6H.js.map +0 -1
- /package/dist/{chunk-2XXG7HNH.js.map → chunk-NZBKTVEZ.js.map} +0 -0
- /package/dist/{http-4DI4LQCX.js.map → http-7B5TPJ6F.js.map} +0 -0
- /package/dist/{http-B632MJBF.js.map → http-TVPWBP7C.js.map} +0 -0
- /package/dist/{replay-UXFZNGGI.js.map → replay-3C5KEHVO.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
flushTraces,
|
|
8
8
|
parseRetryAfterMs,
|
|
9
9
|
serializePayloadBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YM4CEDSB.js";
|
|
11
11
|
import "./chunk-MT36GJMW.js";
|
|
12
12
|
export {
|
|
13
13
|
BitfabError,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
parseRetryAfterMs,
|
|
20
20
|
serializePayloadBody
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=http-
|
|
22
|
+
//# sourceMappingURL=http-7B5TPJ6F.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
flushTraces,
|
|
8
8
|
parseRetryAfterMs,
|
|
9
9
|
serializePayloadBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-O7BR6N3G.js";
|
|
11
11
|
export {
|
|
12
12
|
BitfabError,
|
|
13
13
|
HttpClient,
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
parseRetryAfterMs,
|
|
19
19
|
serializePayloadBody
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=http-
|
|
21
|
+
//# sourceMappingURL=http-TVPWBP7C.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var __version__, __packageName__;
|
|
|
42
42
|
var init_version_generated = __esm({
|
|
43
43
|
"src/version.generated.ts"() {
|
|
44
44
|
"use strict";
|
|
45
|
-
__version__ = "0.64.
|
|
45
|
+
__version__ = "0.64.2";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -9277,6 +9277,22 @@ var BitfabVercelAiHandler = class {
|
|
|
9277
9277
|
|
|
9278
9278
|
// src/client.ts
|
|
9279
9279
|
init_warnOnce();
|
|
9280
|
+
function markTracedFunction(target, traceFunctionKey, original) {
|
|
9281
|
+
Object.defineProperty(target, "_bitfabTraceFunctionKey", {
|
|
9282
|
+
value: traceFunctionKey
|
|
9283
|
+
});
|
|
9284
|
+
Object.defineProperty(target, "_bitfabWrappedFn", { value: original });
|
|
9285
|
+
Object.defineProperty(target, "bind", {
|
|
9286
|
+
value(thisArg, ...boundArgs) {
|
|
9287
|
+
return markTracedFunction(
|
|
9288
|
+
Function.prototype.bind.call(this, thisArg, ...boundArgs),
|
|
9289
|
+
traceFunctionKey,
|
|
9290
|
+
original
|
|
9291
|
+
);
|
|
9292
|
+
}
|
|
9293
|
+
});
|
|
9294
|
+
return target;
|
|
9295
|
+
}
|
|
9280
9296
|
function resolveSpanExperimentId(options) {
|
|
9281
9297
|
const { experimentId, testRunId } = options;
|
|
9282
9298
|
if (experimentId !== void 0 && testRunId !== void 0 && experimentId !== testRunId) {
|
|
@@ -10127,11 +10143,7 @@ var Bitfab = class {
|
|
|
10127
10143
|
}
|
|
10128
10144
|
);
|
|
10129
10145
|
};
|
|
10130
|
-
|
|
10131
|
-
value: traceFunctionKey
|
|
10132
|
-
});
|
|
10133
|
-
Object.defineProperty(autoTraceRoot, "_bitfabWrappedFn", { value: fn });
|
|
10134
|
-
return autoTraceRoot;
|
|
10146
|
+
return markTracedFunction(autoTraceRoot, traceFunctionKey, fn);
|
|
10135
10147
|
}
|
|
10136
10148
|
applySimulationPlan(payload, submit, drop) {
|
|
10137
10149
|
this.simulationPlan.send(
|
|
@@ -11146,11 +11158,7 @@ var Bitfab = class {
|
|
|
11146
11158
|
}
|
|
11147
11159
|
return runWithSpanStack(newStack, executeWithContext);
|
|
11148
11160
|
};
|
|
11149
|
-
|
|
11150
|
-
value: traceFunctionKey
|
|
11151
|
-
});
|
|
11152
|
-
Object.defineProperty(wrappedFn, "_bitfabWrappedFn", { value: fn });
|
|
11153
|
-
return wrappedFn;
|
|
11161
|
+
return markTracedFunction(wrappedFn, traceFunctionKey, fn);
|
|
11154
11162
|
}
|
|
11155
11163
|
/**
|
|
11156
11164
|
* Create a standard ECMAScript method decorator that records each invocation
|
|
@@ -11955,9 +11963,36 @@ init_replay();
|
|
|
11955
11963
|
init_errors();
|
|
11956
11964
|
init_replay();
|
|
11957
11965
|
init_replayInterrupt();
|
|
11966
|
+
init_warnOnce();
|
|
11958
11967
|
function defineReplayRegistry(registry) {
|
|
11968
|
+
validateReplayRegistry(registry);
|
|
11959
11969
|
return registry;
|
|
11960
11970
|
}
|
|
11971
|
+
var REGISTRATION_FIELDS = /* @__PURE__ */ new Set([
|
|
11972
|
+
"client",
|
|
11973
|
+
"fn",
|
|
11974
|
+
"traceFunctionKey",
|
|
11975
|
+
"options",
|
|
11976
|
+
"optionsFactory"
|
|
11977
|
+
]);
|
|
11978
|
+
function validateReplayRegistry(registry) {
|
|
11979
|
+
for (const [pipeline, registration] of Object.entries(registry)) {
|
|
11980
|
+
if (typeof registration !== "object" || registration === null) {
|
|
11981
|
+
throw new BitfabError(
|
|
11982
|
+
`Replay registry entry '${pipeline}' must be an object with client and fn.`
|
|
11983
|
+
);
|
|
11984
|
+
}
|
|
11985
|
+
const unknownFields = Object.keys(registration).filter(
|
|
11986
|
+
(field) => !REGISTRATION_FIELDS.has(field)
|
|
11987
|
+
);
|
|
11988
|
+
if (unknownFields.length > 0) {
|
|
11989
|
+
warnOnce(
|
|
11990
|
+
`replay-registry-unknown-fields:${pipeline}:${unknownFields.join(",")}`,
|
|
11991
|
+
`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.`
|
|
11992
|
+
);
|
|
11993
|
+
}
|
|
11994
|
+
}
|
|
11995
|
+
}
|
|
11961
11996
|
async function reseedFromRegistry(registry, pipeline, traceIds) {
|
|
11962
11997
|
const registration = registry[pipeline];
|
|
11963
11998
|
if (registration === void 0) {
|