@bitfab/sdk 0.62.7 → 0.62.8

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.
@@ -17,7 +17,7 @@ import {
17
17
  serializeValue,
18
18
  toJsonSafe,
19
19
  toJsonSafeReport
20
- } from "./chunk-ZHPO4I7L.js";
20
+ } from "./chunk-CFCJQJ6X.js";
21
21
  import {
22
22
  BitfabError,
23
23
  CONTENT_OFF_KEY,
@@ -36,7 +36,7 @@ import {
36
36
  readEnv,
37
37
  recordCallerTraceMetadata,
38
38
  retireTraceMetadata
39
- } from "./chunk-3L4TQ3RW.js";
39
+ } from "./chunk-HOAPC5CK.js";
40
40
  import {
41
41
  __privateAdd,
42
42
  __privateGet,
@@ -6245,7 +6245,7 @@ var Bitfab = class {
6245
6245
  await runWithSeedContext({ traceId }, async () => target(...args));
6246
6246
  } finally {
6247
6247
  try {
6248
- const { flushTraces: flushTraces2 } = await import("./http-TQBXGFHA.js");
6248
+ const { flushTraces: flushTraces2 } = await import("./http-Q5ENQTX4.js");
6249
6249
  await flushTraces2(3e4);
6250
6250
  } finally {
6251
6251
  unrecorded = activeTraceStates.delete(traceId);
@@ -6304,7 +6304,7 @@ var Bitfab = class {
6304
6304
  `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.`
6305
6305
  );
6306
6306
  }
6307
- const { replay: doReplay } = await import("./replay-6EUUVQTR.js");
6307
+ const { replay: doReplay } = await import("./replay-6M4EUBNG.js");
6308
6308
  return doReplay(
6309
6309
  this.httpClient,
6310
6310
  this.serviceUrl,
@@ -6624,7 +6624,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
6624
6624
  sessionId: seedCase.sessionId
6625
6625
  })
6626
6626
  );
6627
- const { flushTraces: flushTraces2 } = await import("./http-TQBXGFHA.js");
6627
+ const { flushTraces: flushTraces2 } = await import("./http-Q5ENQTX4.js");
6628
6628
  await flushTraces2(3e4);
6629
6629
  return { pipeline, traceFunctionKey, traceIds };
6630
6630
  }
@@ -6669,4 +6669,4 @@ export {
6669
6669
  reseedFromRegistry,
6670
6670
  seedFromRegistry
6671
6671
  };
6672
- //# sourceMappingURL=chunk-35RAQIQS.js.map
6672
+ //# sourceMappingURL=chunk-PMJB43RG.js.map
@@ -7,7 +7,7 @@ import {
7
7
  flushTraces,
8
8
  parseRetryAfterMs,
9
9
  serializePayloadBody
10
- } from "./chunk-AZ2KO7WO.js";
10
+ } from "./chunk-EIYFITIN.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-SI5MKPJC.js.map
21
+ //# sourceMappingURL=http-523END2I.js.map
@@ -7,7 +7,7 @@ import {
7
7
  flushTraces,
8
8
  parseRetryAfterMs,
9
9
  serializePayloadBody
10
- } from "./chunk-3L4TQ3RW.js";
10
+ } from "./chunk-HOAPC5CK.js";
11
11
  import "./chunk-BAOIRE5T.js";
12
12
  export {
13
13
  BitfabError,
@@ -19,4 +19,4 @@ export {
19
19
  parseRetryAfterMs,
20
20
  serializePayloadBody
21
21
  };
22
- //# sourceMappingURL=http-TQBXGFHA.js.map
22
+ //# sourceMappingURL=http-Q5ENQTX4.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.62.7";
45
+ __version__ = "0.62.8";
46
46
  __packageName__ = "@bitfab/sdk";
47
47
  }
48
48
  });
@@ -3447,7 +3447,7 @@ async function captureCodeChangeFromGit(cwd, label) {
3447
3447
  if (!resolved2) {
3448
3448
  return null;
3449
3449
  }
3450
- const { base, fromTrunk } = resolved2;
3450
+ const { base, against } = resolved2;
3451
3451
  const blobBytes = async (ref2, path) => {
3452
3452
  const out = await git(root, ["cat-file", "-s", `${ref2}:${path}`]);
3453
3453
  const n = out ? Number.parseInt(out.trim(), 10) : Number.NaN;
@@ -3515,7 +3515,6 @@ async function captureCodeChangeFromGit(cwd, label) {
3515
3515
  const subject = (await git(root, ["log", "-1", "--format=%s", "HEAD"]))?.trim();
3516
3516
  const fileWord = files.length === 1 ? "file" : "files";
3517
3517
  const head = label?.trim() || subject || "Working-tree change";
3518
- const against = fromTrunk ? "vs trunk" : "uncommitted (vs HEAD)";
3519
3518
  return {
3520
3519
  description: `${head} (${files.length} ${fileWord} changed ${against})`,
3521
3520
  files
@@ -3528,18 +3527,9 @@ async function resolveBase(git, root) {
3528
3527
  const forced = process.env?.BITFAB_CODE_CHANGE_BASE;
3529
3528
  if (forced && await refExists(git, root, forced)) {
3530
3529
  const base = (await git(root, ["merge-base", "HEAD", forced]))?.trim() || (await git(root, ["rev-parse", "--verify", forced]))?.trim() || null;
3531
- return base ? { base, fromTrunk: true } : null;
3530
+ return base ? { base, against: `vs ${forced}` } : null;
3532
3531
  }
3533
- for (const candidate of TRUNK_CANDIDATES) {
3534
- if (!await refExists(git, root, candidate)) {
3535
- continue;
3536
- }
3537
- const mb = (await git(root, ["merge-base", "HEAD", candidate]))?.trim();
3538
- if (mb) {
3539
- return { base: mb, fromTrunk: true };
3540
- }
3541
- }
3542
- return await refExists(git, root, "HEAD") ? { base: "HEAD", fromTrunk: false } : null;
3532
+ return await refExists(git, root, "HEAD") ? { base: "HEAD", against: "uncommitted (vs HEAD)" } : null;
3543
3533
  }
3544
3534
  async function refExists(git, root, ref2) {
3545
3535
  return await git(root, ["rev-parse", "--verify", `${ref2}^{object}`]) !== null;
@@ -3573,7 +3563,7 @@ function parseNameStatusZ(raw) {
3573
3563
  function looksBinary(s) {
3574
3564
  return s.slice(0, 8e3).includes(NUL);
3575
3565
  }
3576
- var MAX_FILES, MAX_FILE_BYTES, MAX_TOTAL_BYTES, TRUNK_CANDIDATES, NUL;
3566
+ var MAX_FILES, MAX_FILE_BYTES, MAX_TOTAL_BYTES, NUL;
3577
3567
  var init_codeChange = __esm({
3578
3568
  "src/codeChange.ts"() {
3579
3569
  "use strict";
@@ -3581,13 +3571,6 @@ var init_codeChange = __esm({
3581
3571
  MAX_FILES = 60;
3582
3572
  MAX_FILE_BYTES = 5e5;
3583
3573
  MAX_TOTAL_BYTES = 2e6;
3584
- TRUNK_CANDIDATES = [
3585
- "origin/HEAD",
3586
- "origin/main",
3587
- "origin/master",
3588
- "main",
3589
- "master"
3590
- ];
3591
3574
  NUL = String.fromCharCode(0);
3592
3575
  }
3593
3576
  });