bitfab-cli 0.2.227 → 0.2.228

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.
Files changed (2) hide show
  1. package/dist/index.js +61 -43
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4974,7 +4974,7 @@ var require_compile = __commonJS({
4974
4974
  const schOrFunc = root.refs[ref];
4975
4975
  if (schOrFunc)
4976
4976
  return schOrFunc;
4977
- let _sch = resolve2.call(this, root, ref);
4977
+ let _sch = resolve4.call(this, root, ref);
4978
4978
  if (_sch === void 0) {
4979
4979
  const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
4980
4980
  const { schemaId } = this.opts;
@@ -5001,7 +5001,7 @@ var require_compile = __commonJS({
5001
5001
  function sameSchemaEnv(s1, s2) {
5002
5002
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
5003
5003
  }
5004
- function resolve2(root, ref) {
5004
+ function resolve4(root, ref) {
5005
5005
  let sch;
5006
5006
  while (typeof (sch = this.refs[ref]) == "string")
5007
5007
  ref = sch;
@@ -5632,7 +5632,7 @@ var require_fast_uri = __commonJS({
5632
5632
  }
5633
5633
  return uri;
5634
5634
  }
5635
- function resolve2(baseURI, relativeURI, options) {
5635
+ function resolve4(baseURI, relativeURI, options) {
5636
5636
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
5637
5637
  const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
5638
5638
  schemelessOptions.skipEscape = true;
@@ -5890,7 +5890,7 @@ var require_fast_uri = __commonJS({
5890
5890
  var fastUri = {
5891
5891
  SCHEMES,
5892
5892
  normalize,
5893
- resolve: resolve2,
5893
+ resolve: resolve4,
5894
5894
  resolveComponent,
5895
5895
  equal,
5896
5896
  serialize: serialize2,
@@ -9028,14 +9028,14 @@ async function pollAgentSessionEvents(opts) {
9028
9028
  opts.onError(err instanceof Error ? err : new Error(String(err)));
9029
9029
  }
9030
9030
  }
9031
- await new Promise((resolve2) => {
9031
+ await new Promise((resolve4) => {
9032
9032
  const onAbort = () => {
9033
9033
  clearTimeout(timer);
9034
- resolve2();
9034
+ resolve4();
9035
9035
  };
9036
9036
  const timer = setTimeout(() => {
9037
9037
  opts.abortSignal.removeEventListener("abort", onAbort);
9038
- resolve2();
9038
+ resolve4();
9039
9039
  }, interval);
9040
9040
  opts.abortSignal.addEventListener("abort", onAbort, { once: true });
9041
9041
  });
@@ -9097,9 +9097,9 @@ var PING_PONG_TIMEOUT_MS = 5e3;
9097
9097
  function awaitNavigateAck(client, path21, ackTimeoutMs, startCursor) {
9098
9098
  const abortController = new AbortController();
9099
9099
  let timer = null;
9100
- const result = new Promise((resolve2) => {
9100
+ const result = new Promise((resolve4) => {
9101
9101
  timer = setTimeout(() => {
9102
- resolve2({ acked: false, reason: "timeout" });
9102
+ resolve4({ acked: false, reason: "timeout" });
9103
9103
  abortController.abort();
9104
9104
  }, ackTimeoutMs);
9105
9105
  const pathOnly = path21.split("?")[0];
@@ -9119,7 +9119,7 @@ function awaitNavigateAck(client, path21, ackTimeoutMs, startCursor) {
9119
9119
  if (timer) {
9120
9120
  clearTimeout(timer);
9121
9121
  }
9122
- resolve2({ acked: true });
9122
+ resolve4({ acked: true });
9123
9123
  abortController.abort();
9124
9124
  return;
9125
9125
  }
@@ -9127,7 +9127,7 @@ function awaitNavigateAck(client, path21, ackTimeoutMs, startCursor) {
9127
9127
  if (timer) {
9128
9128
  clearTimeout(timer);
9129
9129
  }
9130
- resolve2({
9130
+ resolve4({
9131
9131
  acked: false,
9132
9132
  reason: "blocked",
9133
9133
  blockedReason: event.data.reason
@@ -9139,7 +9139,7 @@ function awaitNavigateAck(client, path21, ackTimeoutMs, startCursor) {
9139
9139
  if (timer) {
9140
9140
  clearTimeout(timer);
9141
9141
  }
9142
- resolve2({ acked: false, reason: "window-closed" });
9142
+ resolve4({ acked: false, reason: "window-closed" });
9143
9143
  abortController.abort();
9144
9144
  }
9145
9145
  },
@@ -9152,18 +9152,18 @@ function awaitNavigateAck(client, path21, ackTimeoutMs, startCursor) {
9152
9152
  if (timer) {
9153
9153
  clearTimeout(timer);
9154
9154
  }
9155
- resolve2({ acked: false, reason: "timeout" });
9155
+ resolve4({ acked: false, reason: "timeout" });
9156
9156
  });
9157
9157
  });
9158
9158
  return result;
9159
9159
  }
9160
9160
  function awaitPong(client, pingTs) {
9161
- return new Promise((resolve2) => {
9161
+ return new Promise((resolve4) => {
9162
9162
  const abortController = new AbortController();
9163
9163
  let received = false;
9164
9164
  const timer = setTimeout(() => {
9165
9165
  abortController.abort();
9166
- resolve2(false);
9166
+ resolve4(false);
9167
9167
  }, PING_PONG_TIMEOUT_MS);
9168
9168
  pollAgentSessionEvents({
9169
9169
  serviceUrl: client.serviceUrl,
@@ -9175,7 +9175,7 @@ function awaitPong(client, pingTs) {
9175
9175
  received = true;
9176
9176
  clearTimeout(timer);
9177
9177
  abortController.abort();
9178
- resolve2(true);
9178
+ resolve4(true);
9179
9179
  }
9180
9180
  },
9181
9181
  onError: () => {
@@ -9183,7 +9183,7 @@ function awaitPong(client, pingTs) {
9183
9183
  }).catch(() => {
9184
9184
  if (!received) {
9185
9185
  clearTimeout(timer);
9186
- resolve2(false);
9186
+ resolve4(false);
9187
9187
  }
9188
9188
  });
9189
9189
  });
@@ -10413,10 +10413,10 @@ function readPid(pidPath) {
10413
10413
  }
10414
10414
  }
10415
10415
  async function pingSocket(socketPath) {
10416
- return new Promise((resolve2) => {
10416
+ return new Promise((resolve4) => {
10417
10417
  const timeout = setTimeout(() => {
10418
10418
  socket.destroy();
10419
- resolve2({ alive: false, build: null });
10419
+ resolve4({ alive: false, build: null });
10420
10420
  }, PING_TIMEOUT_MS);
10421
10421
  const socket = net.createConnection(socketPath, () => {
10422
10422
  socket.write('{"cmd":"ping"}\n');
@@ -10429,15 +10429,15 @@ async function pingSocket(socketPath) {
10429
10429
  socket.destroy();
10430
10430
  try {
10431
10431
  const msg = JSON.parse(buffer.split("\n")[0]);
10432
- resolve2({ alive: msg.ok === true, build: msg.build ?? null });
10432
+ resolve4({ alive: msg.ok === true, build: msg.build ?? null });
10433
10433
  } catch {
10434
- resolve2({ alive: false, build: null });
10434
+ resolve4({ alive: false, build: null });
10435
10435
  }
10436
10436
  }
10437
10437
  });
10438
10438
  socket.on("error", () => {
10439
10439
  clearTimeout(timeout);
10440
- resolve2({ alive: false, build: null });
10440
+ resolve4({ alive: false, build: null });
10441
10441
  });
10442
10442
  });
10443
10443
  }
@@ -10668,10 +10668,10 @@ var DaemonClient = class {
10668
10668
  }
10669
10669
  async connect() {
10670
10670
  await ensureDaemon(this.paths);
10671
- return new Promise((resolve2, reject) => {
10671
+ return new Promise((resolve4, reject) => {
10672
10672
  const socket = net2.createConnection(this.socketPath, () => {
10673
10673
  this.socket = socket;
10674
- resolve2();
10674
+ resolve4();
10675
10675
  });
10676
10676
  socket.on("data", (chunk2) => {
10677
10677
  this.buffer += chunk2.toString();
@@ -10725,7 +10725,7 @@ var DaemonClient = class {
10725
10725
  }
10726
10726
  const timeoutMs = opts.timeoutMs ?? this.commandTimeoutMs;
10727
10727
  const cmdName = cmd.cmd ?? "command";
10728
- return new Promise((resolve2, reject) => {
10728
+ return new Promise((resolve4, reject) => {
10729
10729
  let settled = false;
10730
10730
  const timer = setTimeout(() => {
10731
10731
  if (settled) {
@@ -10752,7 +10752,7 @@ var DaemonClient = class {
10752
10752
  }
10753
10753
  settled = true;
10754
10754
  clearTimeout(timer);
10755
- resolve2(msg);
10755
+ resolve4(msg);
10756
10756
  };
10757
10757
  this.responseQueue.push(resolver);
10758
10758
  try {
@@ -10926,9 +10926,9 @@ function readStudioEventLogTail(key, fromLine = 1) {
10926
10926
  function tailStudioEvents(key, onLine, opts) {
10927
10927
  const pollMs = opts.pollMs ?? 200;
10928
10928
  let cursor = opts.fromLine ?? 1;
10929
- return new Promise((resolve2) => {
10929
+ return new Promise((resolve4) => {
10930
10930
  if (opts.abortSignal.aborted) {
10931
- resolve2();
10931
+ resolve4();
10932
10932
  return;
10933
10933
  }
10934
10934
  const tick = () => {
@@ -10948,7 +10948,7 @@ function tailStudioEvents(key, onLine, opts) {
10948
10948
  }, pollMs);
10949
10949
  opts.abortSignal.addEventListener("abort", () => {
10950
10950
  clearInterval(timer);
10951
- resolve2();
10951
+ resolve4();
10952
10952
  }, { once: true });
10953
10953
  tick();
10954
10954
  });
@@ -11134,8 +11134,8 @@ var DaemonChannel = class _DaemonChannel {
11134
11134
  });
11135
11135
  }
11136
11136
  subscribe(_sessionId, onEvent, onError) {
11137
- const done = new Promise((resolve2) => {
11138
- this.doneResolve = resolve2;
11137
+ const done = new Promise((resolve4) => {
11138
+ this.doneResolve = resolve4;
11139
11139
  });
11140
11140
  this.client.onEvent((push) => {
11141
11141
  const event = {
@@ -11718,7 +11718,7 @@ async function openStudioTo(path21, opts = {}) {
11718
11718
  emit({ event: "navigated", sessionId: sessionId2, path: buildSignInPath(sessionId2) });
11719
11719
  }
11720
11720
  emit({ event: "auth-required", sessionId: sessionId2, signInUrl });
11721
- const loginApiKey = await new Promise((resolve2, reject) => {
11721
+ const loginApiKey = await new Promise((resolve4, reject) => {
11722
11722
  const timer = setTimeout(() => {
11723
11723
  sub.abort();
11724
11724
  reject(new Error("Login polling aborted"));
@@ -11732,7 +11732,7 @@ async function openStudioTo(path21, opts = {}) {
11732
11732
  if (event.type === "studio:authenticated" && typeof event.data?.token === "string") {
11733
11733
  cleanup();
11734
11734
  sub.abort();
11735
- resolve2(event.data.token);
11735
+ resolve4(event.data.token);
11736
11736
  }
11737
11737
  }, (err) => {
11738
11738
  cleanup();
@@ -26433,11 +26433,21 @@ import net3 from "net";
26433
26433
 
26434
26434
  // ../bitfab-plugin-lib/dist/commands/replayProgress.js
26435
26435
  import { spawn as spawn4 } from "child_process";
26436
- import { randomUUID } from "crypto";
26437
- import { appendFileSync, createWriteStream, existsSync, mkdirSync, readFileSync as readFileSync2, renameSync, rmSync, statSync, writeFileSync as writeFileSync2 } from "fs";
26438
- import { dirname, join as join2, resolve } from "path";
26436
+ import { createWriteStream, mkdirSync as mkdirSync4, rmSync as rmSync2 } from "fs";
26437
+ import { dirname as dirname3, resolve as resolve3 } from "path";
26439
26438
  import { createInterface } from "readline";
26440
- var HEARTBEAT_MS = Number(process.env.BITFAB_REPLAY_HEARTBEAT_MS) || 12e3;
26439
+
26440
+ // ../bitfab-plugin-lib/dist/replayItemWriter.js
26441
+ import { mkdirSync as mkdirSync2, renameSync, writeFileSync as writeFileSync3 } from "fs";
26442
+ import { join as join2 } from "path";
26443
+
26444
+ // ../bitfab-plugin-lib/dist/bestEffortFs.js
26445
+ import { mkdirSync, writeFileSync as writeFileSync2 } from "fs";
26446
+ import { dirname } from "path";
26447
+
26448
+ // ../bitfab-plugin-lib/dist/replayResultResolver.js
26449
+ import { readFileSync as readFileSync2, rmSync } from "fs";
26450
+ import { resolve } from "path";
26441
26451
  var replayResultSchema = external_exports.object({
26442
26452
  items: external_exports.array(external_exports.unknown()),
26443
26453
  testRunId: external_exports.string().optional(),
@@ -26446,6 +26456,14 @@ var replayResultSchema = external_exports.object({
26446
26456
  test_run_url: external_exports.string().optional()
26447
26457
  }).passthrough().refine(({ testRunId, test_run_id }) => testRunId !== void 0 || test_run_id !== void 0);
26448
26458
 
26459
+ // ../bitfab-plugin-lib/dist/replayRunDir.js
26460
+ import { randomUUID } from "crypto";
26461
+ import { appendFileSync, existsSync, mkdirSync as mkdirSync3, readFileSync as readFileSync3, statSync } from "fs";
26462
+ import { dirname as dirname2, join as join3, resolve as resolve2 } from "path";
26463
+
26464
+ // ../bitfab-plugin-lib/dist/commands/replayProgress.js
26465
+ var HEARTBEAT_MS = Number(process.env.BITFAB_REPLAY_HEARTBEAT_MS) || 12e3;
26466
+
26449
26467
  // ../bitfab-plugin-lib/dist/activePreviewSession.js
26450
26468
  import fs15 from "fs";
26451
26469
  import os12 from "os";
@@ -28784,7 +28802,7 @@ async function runClaudeAnalyzeRepo(captureOverride, limit, prompt) {
28784
28802
  }
28785
28803
  };
28786
28804
  try {
28787
- const exitCode = await new Promise((resolve2, reject) => {
28805
+ const exitCode = await new Promise((resolve4, reject) => {
28788
28806
  const child = spawn5(
28789
28807
  CLI,
28790
28808
  [
@@ -28823,7 +28841,7 @@ async function runClaudeAnalyzeRepo(captureOverride, limit, prompt) {
28823
28841
  );
28824
28842
  return;
28825
28843
  }
28826
- resolve2(code);
28844
+ resolve4(code);
28827
28845
  });
28828
28846
  });
28829
28847
  flushRedactors();
@@ -29663,7 +29681,7 @@ async function runCodexAnalyzeRepo(captureOverride, limit, prompt) {
29663
29681
  }
29664
29682
  };
29665
29683
  try {
29666
- const exitCode = await new Promise((resolve2, reject) => {
29684
+ const exitCode = await new Promise((resolve4, reject) => {
29667
29685
  const child = spawn6(
29668
29686
  CLI2,
29669
29687
  [
@@ -29705,7 +29723,7 @@ async function runCodexAnalyzeRepo(captureOverride, limit, prompt) {
29705
29723
  );
29706
29724
  return;
29707
29725
  }
29708
- resolve2(code);
29726
+ resolve4(code);
29709
29727
  });
29710
29728
  });
29711
29729
  flushRedactors();
@@ -30040,7 +30058,7 @@ async function runCursorAnalyzeRepo(captureOverride, limit, prompt) {
30040
30058
  }
30041
30059
  };
30042
30060
  try {
30043
- const exitCode = await new Promise((resolve2, reject) => {
30061
+ const exitCode = await new Promise((resolve4, reject) => {
30044
30062
  const child = spawn7(
30045
30063
  "cursor",
30046
30064
  [
@@ -30085,7 +30103,7 @@ async function runCursorAnalyzeRepo(captureOverride, limit, prompt) {
30085
30103
  );
30086
30104
  return;
30087
30105
  }
30088
- resolve2(code);
30106
+ resolve4(code);
30089
30107
  });
30090
30108
  });
30091
30109
  flushRedactors();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitfab-cli",
3
- "version": "0.2.227",
3
+ "version": "0.2.228",
4
4
  "description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",