tamperward 2.24.5 → 2.24.7

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/index.js +16 -7
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -16930,7 +16930,8 @@ function writeVerifyCommand(cwd, command) {
16930
16930
  async function runOnboard(opts, io = {}) {
16931
16931
  const requestedCwd = resolve11(opts.cwd ?? process.cwd());
16932
16932
  const out3 = io.out ?? ((line) => void process.stdout.write(line + "\n"));
16933
- const rawErr = (line) => void process.stderr.write(terminalText(line) + "\n");
16933
+ const errLine = (line) => void process.stderr.write(line + "\n");
16934
+ const rawErr = (line) => errLine(terminalText(line));
16934
16935
  const platform = io.platform ?? process.platform;
16935
16936
  const colour = io.colour ?? colourEnabled(process.env, process.stdout);
16936
16937
  const runners = {
@@ -16952,7 +16953,10 @@ async function runOnboard(opts, io = {}) {
16952
16953
  const status = (label, text, kind = "info") => {
16953
16954
  out3(paint2(label.padEnd(8), (kind === "bad" ? BOLD2 : "") + tone(kind), colour) + " " + terminalText(text));
16954
16955
  };
16955
- const fail = (text) => rawErr(paint2("ERROR ", BOLD2 + RED2, colour) + " " + text);
16956
+ const errStatus = (label, text, kind = "info") => {
16957
+ errLine(paint2(label.padEnd(8), (kind === "bad" ? BOLD2 : "") + tone(kind), colour) + " " + terminalText(text));
16958
+ };
16959
+ const fail = (text) => errStatus("ERROR", text, "bad");
16956
16960
  if (!interactive && !scripted) {
16957
16961
  fail("onboard needs an interactive terminal.");
16958
16962
  rawErr('Use `tamperward onboard --yes --verify-command "<suite command>"` for scripted setup,');
@@ -16971,11 +16975,16 @@ async function runOnboard(opts, io = {}) {
16971
16975
  } catch {
16972
16976
  }
16973
16977
  if (!sameRoot) {
16974
- fail("current directory is not the Git repository root.");
16975
- rawErr("Current: " + requestedCwd);
16976
- rawErr("Git root: " + cwd);
16977
- rawErr("TamperWard installs repository-wide hooks and CI, so it will not mix a child directory with its parent repository.");
16978
- rawErr("Run from the Git root, or run `git init` in the child directory if it should be a separate repository.");
16978
+ fail("Repository root mismatch.");
16979
+ rawErr("");
16980
+ errStatus("CURRENT", requestedCwd, "dim");
16981
+ errStatus("GIT ROOT", cwd, "info");
16982
+ rawErr("");
16983
+ rawErr("TamperWard installs repository-wide hooks and CI, so setup must run at the repository root.");
16984
+ rawErr("It will not attach child-directory setup to a parent repository.");
16985
+ rawErr("");
16986
+ errStatus("NEXT", "Run `tamperward onboard` from the Git root shown above.", "warn");
16987
+ errStatus("OR", "Run `git init` here first if the current directory should be a separate repository.", "dim");
16979
16988
  return 2;
16980
16989
  }
16981
16990
  const prompt = { asker: null };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamperward",
3
- "version": "2.24.5",
3
+ "version": "2.24.7",
4
4
  "description": "The deterministic agent-integrity gate. One ruleset, evaluated on the actual diff/commands as a verdict, enforced everywhere a change can be made.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "hexrift",