@bitfab/sdk 0.76.1 → 0.76.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/{http-ykHGNcju.cjs → http-DscPFMlr.cjs} +67 -2
- package/dist/{http-DS1QjBvx.js.map → http-DscPFMlr.cjs.map} +1 -1
- package/dist/{http-DS1QjBvx.js → http-wadCG_ec.js} +56 -3
- package/dist/http-wadCG_ec.js.map +1 -0
- package/dist/{index-BYv4DSsY.d.cts → index-D5NpBqF3.d.cts} +1 -1
- package/dist/{index-BYv4DSsY.d.ts → index-D5NpBqF3.d.ts} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/node.cjs +2 -2
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +2 -2
- package/dist/{registryCommand-D1VgfJjC.js → registryCommand-M1u4H9PI.js} +30 -14
- package/dist/registryCommand-M1u4H9PI.js.map +1 -0
- package/dist/replayCli.js +1 -1
- package/dist/seedCli.js +1 -1
- package/dist/{src-CLkegn-P.cjs → src-B6zSnPpb.cjs} +10 -22
- package/dist/src-B6zSnPpb.cjs.map +1 -0
- package/dist/{src-BJjbR3Nq.js → src-CcYVtNMw.js} +10 -22
- package/dist/src-CcYVtNMw.js.map +1 -0
- package/package.json +1 -1
- package/dist/http-ykHGNcju.cjs.map +0 -1
- package/dist/registryCommand-D1VgfJjC.js.map +0 -1
- package/dist/src-BJjbR3Nq.js.map +0 -1
- package/dist/src-CLkegn-P.cjs.map +0 -1
package/dist/replayCli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as runRegistryMain, c as runSeedCli, i as runIfEntrypoint, n as parseRegistryCommandArgs, o as checkReplayCliArgs, r as resolveRegistry, s as runReplayCli, t as importRegistry } from "./registryCommand-
|
|
2
|
+
import { a as runRegistryMain, c as runSeedCli, i as runIfEntrypoint, n as parseRegistryCommandArgs, o as checkReplayCliArgs, r as resolveRegistry, s as runReplayCli, t as importRegistry } from "./registryCommand-M1u4H9PI.js";
|
|
3
3
|
//#region src/cloudReplayCli.ts
|
|
4
4
|
const CLOUD_REPLAY_HINT = "Add --cloud to run the same replay on GitHub Actions; bitfab-replay --cloud --help explains it.";
|
|
5
5
|
function isCloudReplayCommand(argv) {
|
package/dist/seedCli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as runRegistryMain, c as runSeedCli, i as runIfEntrypoint, n as parseRegistryCommandArgs, r as resolveRegistry, t as importRegistry } from "./registryCommand-
|
|
2
|
+
import { a as runRegistryMain, c as runSeedCli, i as runIfEntrypoint, n as parseRegistryCommandArgs, r as resolveRegistry, t as importRegistry } from "./registryCommand-M1u4H9PI.js";
|
|
3
3
|
//#region src/seedCli.ts
|
|
4
4
|
const USAGE = "Usage: bitfab-seed --registry <path> <pipeline> --from-trace <id>[,<id>...]\n bitfab-seed --registry <path> <pipeline> --cases <cases.jsonl> [--run]\nRun bitfab-seed --registry <path> <pipeline> --help for details.";
|
|
5
5
|
async function runSeedCommand(argv, io = {}, importer = importRegistry) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_bamlPeer = require("./bamlPeer-5Ohpq8q9.cjs");
|
|
2
|
-
const require_http = require("./http-
|
|
2
|
+
const require_http = require("./http-DscPFMlr.cjs");
|
|
3
3
|
const require_autoTrace = require("./autoTrace-pZKu5Nk2.cjs");
|
|
4
4
|
const require_optionalPeer = require("./optionalPeer-CUH756lt.cjs");
|
|
5
5
|
let superjson = require("superjson");
|
|
@@ -4022,22 +4022,10 @@ function errorMessage(error) {
|
|
|
4022
4022
|
}
|
|
4023
4023
|
function replayItemErrorMessage(error) {
|
|
4024
4024
|
if (error instanceof DbBranchReplayError) return `Replay requested a database branch for trace ${error.originalTraceId} but it could not be resolved (${error.code}): ${error.message}. The function was not run, because replaying it against the live database would produce a result that looks valid but did not use the historical data you asked for.`;
|
|
4025
|
-
return
|
|
4025
|
+
return require_http.describeError(error);
|
|
4026
4026
|
}
|
|
4027
4027
|
function replayJsonReplacer(_key, value) {
|
|
4028
|
-
if (value instanceof Error) {
|
|
4029
|
-
const serialized = {
|
|
4030
|
-
name: value.name,
|
|
4031
|
-
message: value.message,
|
|
4032
|
-
stack: value.stack
|
|
4033
|
-
};
|
|
4034
|
-
if (value instanceof DbBranchReplayError) {
|
|
4035
|
-
serialized.code = value.code;
|
|
4036
|
-
serialized.originalTraceId = value.originalTraceId;
|
|
4037
|
-
if (value.cause !== void 0) serialized.cause = value.cause;
|
|
4038
|
-
}
|
|
4039
|
-
return serialized;
|
|
4040
|
-
}
|
|
4028
|
+
if (value instanceof Error) return require_http.serializeError(value, (error) => error instanceof DbBranchReplayError ? { originalTraceId: error.originalTraceId } : {});
|
|
4041
4029
|
return value;
|
|
4042
4030
|
}
|
|
4043
4031
|
function serializeReplayResult(result) {
|
|
@@ -4216,7 +4204,7 @@ async function processItem(httpClient, serverItem, fn, experimentId, mockStrateg
|
|
|
4216
4204
|
} catch (e) {
|
|
4217
4205
|
if (replayStarted !== null) replayDurationMs = Math.round(performance.now() - replayStarted);
|
|
4218
4206
|
traceError = e;
|
|
4219
|
-
error =
|
|
4207
|
+
error = require_http.describeError(e);
|
|
4220
4208
|
}
|
|
4221
4209
|
} catch (e) {
|
|
4222
4210
|
if (replayStarted !== null) replayDurationMs = Math.round(performance.now() - replayStarted);
|
|
@@ -5700,7 +5688,7 @@ function wrapAsyncGenerator(source, spanStack, sendSpan, recordYielded) {
|
|
|
5700
5688
|
} else yielded.push(result.value);
|
|
5701
5689
|
return result;
|
|
5702
5690
|
} catch (error) {
|
|
5703
|
-
finalize(
|
|
5691
|
+
finalize(require_http.describeError(error));
|
|
5704
5692
|
throw error;
|
|
5705
5693
|
}
|
|
5706
5694
|
};
|
|
@@ -6796,7 +6784,7 @@ var Bitfab = class {
|
|
|
6796
6784
|
} catch (error) {
|
|
6797
6785
|
sendSpan({
|
|
6798
6786
|
result: void 0,
|
|
6799
|
-
error:
|
|
6787
|
+
error: require_http.describeError(error)
|
|
6800
6788
|
});
|
|
6801
6789
|
throw error;
|
|
6802
6790
|
}
|
|
@@ -6806,7 +6794,7 @@ var Bitfab = class {
|
|
|
6806
6794
|
}).catch((error) => {
|
|
6807
6795
|
sendSpan({
|
|
6808
6796
|
result: void 0,
|
|
6809
|
-
error:
|
|
6797
|
+
error: require_http.describeError(error)
|
|
6810
6798
|
});
|
|
6811
6799
|
throw error;
|
|
6812
6800
|
});
|
|
@@ -7240,7 +7228,7 @@ var Bitfab = class {
|
|
|
7240
7228
|
await runWithSeedContext({ traceId }, async () => target(...args));
|
|
7241
7229
|
} finally {
|
|
7242
7230
|
try {
|
|
7243
|
-
const { flushTraces } = await Promise.resolve().then(() => require("./http-
|
|
7231
|
+
const { flushTraces } = await Promise.resolve().then(() => require("./http-DscPFMlr.cjs")).then((n) => n.http_exports);
|
|
7244
7232
|
await flushTraces(3e4);
|
|
7245
7233
|
} finally {
|
|
7246
7234
|
unrecorded = activeTraceStates.delete(traceId);
|
|
@@ -7458,7 +7446,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
7458
7446
|
metadata: seedCase.metadata,
|
|
7459
7447
|
sessionId: seedCase.sessionId
|
|
7460
7448
|
}));
|
|
7461
|
-
const { flushTraces } = await Promise.resolve().then(() => require("./http-
|
|
7449
|
+
const { flushTraces } = await Promise.resolve().then(() => require("./http-DscPFMlr.cjs")).then((n) => n.http_exports);
|
|
7462
7450
|
await flushTraces(3e4);
|
|
7463
7451
|
return {
|
|
7464
7452
|
pipeline,
|
|
@@ -7708,4 +7696,4 @@ Object.defineProperty(exports, "serializeReplayResult", {
|
|
|
7708
7696
|
}
|
|
7709
7697
|
});
|
|
7710
7698
|
|
|
7711
|
-
//# sourceMappingURL=src-
|
|
7699
|
+
//# sourceMappingURL=src-B6zSnPpb.cjs.map
|