@tablation/crew 0.153.0 → 0.153.1

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/cli.js +31 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6045,6 +6045,16 @@ function gitOk(cwd, args) {
6045
6045
  return null;
6046
6046
  }
6047
6047
  }
6048
+ function probeGit(env = process.env) {
6049
+ try {
6050
+ const out = execFileSync7("git", ["--version"], { encoding: "utf8", env, stdio: ["ignore", "pipe", "pipe"] });
6051
+ return { ok: true, version: out.trim() };
6052
+ } catch (e) {
6053
+ const err3 = e;
6054
+ const why = [err3.stderr, err3.stdout].map(streamText).filter(Boolean).join(" / ");
6055
+ return { ok: false, detail: why || err3.message.trim() };
6056
+ }
6057
+ }
6048
6058
  function commitDate(cwd, sha) {
6049
6059
  const out = gitOk(cwd, ["show", "-s", "--format=%cI", sha]);
6050
6060
  if (!out) return null;
@@ -27472,7 +27482,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
27472
27482
  import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
27473
27483
  import { join as join59 } from "path";
27474
27484
  function builtVersion() {
27475
- return true ? "0.153.0" : null;
27485
+ return true ? "0.153.1" : null;
27476
27486
  }
27477
27487
  var REBUILD_HINT = "rebuild with npm run build";
27478
27488
  function newestMtime(path) {
@@ -32890,7 +32900,16 @@ ${f.tail.trimEnd()}
32890
32900
  break;
32891
32901
  }
32892
32902
  const target = resolvePath(addPath.replace(/^~(?=\/|$)/, homedir11()));
32893
- const top = existsSync60(target) ? gitOk(target, ["rev-parse", "--show-toplevel"]) : null;
32903
+ if (!existsSync60(target)) throw new ReposError(`${target} does not exist`);
32904
+ let top;
32905
+ try {
32906
+ top = git(target, ["rev-parse", "--show-toplevel"]);
32907
+ } catch (e) {
32908
+ const msg = e.message;
32909
+ if (/not a git repository/i.test(msg)) throw new ReposError(`${target} is not a git checkout`);
32910
+ const line = msg.replace(/^git rev-parse --show-toplevel:\s*/, "").split("\n").find((l) => l.trim()) ?? msg;
32911
+ throw new ReposError(`git failed in ${target}, so it could not be checked: ${line.trim()}`);
32912
+ }
32894
32913
  if (!top) throw new ReposError(`${target} is not a git checkout`);
32895
32914
  const origin = originOf(top);
32896
32915
  const plan = planRepoAdd({
@@ -35532,6 +35551,10 @@ ${where.join("\n")}`);
35532
35551
  problems.push(...routePeriscopeProblems({ route: route2.route, hosts: true, repos: settled.map((r) => ({ name: r.name, hasPreviewHook: !!r.config.hooks.preview })), tablePresent, snapshotStale: !!jsonDiff && isStale(jsonDiff) }));
35533
35552
  if (!flag("offline")) problems.push(...await duplicateLivePeriscopeProblems(route2, cfg.ship));
35534
35553
  }
35554
+ const jsonGit = findOnPath("git", doctorSchedulerPath) ? probeGit({ ...process.env, PATH: doctorSchedulerPath }) : void 0;
35555
+ if (jsonGit && !jsonGit.ok) {
35556
+ problems.push({ severity: "blocker", kind: "git_unrunnable", message: `git failed to run: ${jsonGit.detail}`, remedy: "fix the git on the scheduler PATH (on macOS, install the Xcode command line tools), then re-run `crew doctor`" });
35557
+ }
35535
35558
  problems.push(...attentionProblems(openShipAttention(state), problems));
35536
35559
  if (problems.some((p) => p.severity === "blocker")) process.exitCode = 1;
35537
35560
  process.stdout.write(`${JSON.stringify({ offline: flag("offline"), pushAuth, tools: toolRows, daemon: daemonLiveness, problems, passed }, null, 2)}
@@ -35944,8 +35967,12 @@ crew manifest: ${seats2.length ? seats2.map((c) => c.name).join(", ") : "non
35944
35967
  if (cfg.ship.forges) R.line(formatPushAuth("credential helper", probeCredentialHelper(crewCommandLine())).replace("push auth credential helper:", "credential helper:".padEnd(19)));
35945
35968
  for (const p of pushAuth) R.line(formatPushAuth(`${p.repo}`, p.result), { repo: p.repo });
35946
35969
  for (const t of toolRows) R.line(formatToolCheck(t));
35947
- R.line(`git: ${gitPath ? `OK (${gitPath})` : "NOT FOUND on the scheduler PATH"}
35948
- `);
35970
+ const gitProbe = gitPath ? probeGit({ ...process.env, PATH: schedulerPath }) : void 0;
35971
+ const gitBroken = gitProbe && !gitProbe.ok ? gitProbe.detail : void 0;
35972
+ R.line(
35973
+ `git: ${!gitPath ? "NOT FOUND on the scheduler PATH" : gitBroken !== void 0 ? `FAILED to run (${gitPath}): ${gitBroken}` : `OK (${gitPath})`}
35974
+ `
35975
+ );
35949
35976
  if (!allBinsFound || !gitPath) {
35950
35977
  R.line(
35951
35978
  ` scheduler PATH is ${schedulerPath} \u2014 add the directory holding the missing binary to ship.extraPath in crew.yaml, then re-run \`crew doctor\`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.153.0",
3
+ "version": "0.153.1",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",