tend-cli 0.4.0 → 0.4.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.
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { ClaudeSession, EFFORT_LEVELS, EventBus, ReportBuilder, ReportSchema, Snapshot, addUsage, applyCliOverrides, assertGitRepo, buildProgram, changedVsHead, createGit, detectPackageManager, filesUnder, filterToChanged, formatClock, loadConfig, makeTheme, normalize, orchestrate, planWork, reasonLabel, renderSummary, resolveRetryTarget, retryCommand, runScanner, scannerStatus, showCommand, zeroUsage } from "./config-bLQW135C.js";
2
+ import { ClaudeSession, EFFORT_LEVELS, EventBus, ReportBuilder, ReportSchema, Snapshot, addUsage, applyCliOverrides, assertGitRepo, buildProgram, changedVsHead, createGit, detectPackageManager, filesUnder, filterToChanged, formatClock, loadConfig, makeTheme, normalize, orchestrate, planWork, reasonLabel, renderSummary, resolveRetryTarget, retryCommand, runScanner, scannerStatus, showCommand, zeroUsage } from "./config-pmGLB0x1.js";
3
3
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
5
  import { execa } from "execa";
@@ -382,9 +382,11 @@ function revertFile(snapshot, file) {
382
382
  //#endregion
383
383
  //#region src/git/client.ts
384
384
  const UNSAFE_GIT_ENV_KEYS = [
385
+ "EDITOR",
386
+ "VISUAL",
385
387
  "GIT_EDITOR",
386
- "GIT_PAGER",
387
388
  "GIT_SEQUENCE_EDITOR",
389
+ "GIT_PAGER",
388
390
  "PAGER"
389
391
  ];
390
392
  function gitEnv(extra = {}) {
@@ -395,8 +397,8 @@ function gitEnv(extra = {}) {
395
397
  for (const key of UNSAFE_GIT_ENV_KEYS) delete env[key];
396
398
  return env;
397
399
  }
398
- function createGit(root) {
399
- return simpleGit(root).env(gitEnv());
400
+ function createGit(root, extraEnv = {}) {
401
+ return simpleGit(root).env(gitEnv(extraEnv));
400
402
  }
401
403
 
402
404
  //#endregion
@@ -414,7 +416,7 @@ let indexCounter = 0;
414
416
  async function writeWorkingTree(root) {
415
417
  const idxPath = join(tmpdir(), `tend-index-${process.pid}-${indexCounter++}`);
416
418
  try {
417
- const g = createGit(root).env(gitEnv({ GIT_INDEX_FILE: idxPath }));
419
+ const g = createGit(root, { GIT_INDEX_FILE: idxPath });
418
420
  await g.raw(["add", "-A"]);
419
421
  return (await g.raw(["write-tree"])).trim();
420
422
  } finally {
@@ -458,7 +460,8 @@ var Snapshot = class Snapshot {
458
460
  this.root = root;
459
461
  this.sha = sha;
460
462
  }
461
- static async capture(git, cwd) {
463
+ static async capture(_git, cwd) {
464
+ const git = createGit(cwd);
462
465
  const root = (await git.revparse(["--show-toplevel"])).trim();
463
466
  const gitDir = (await git.revparse(["--absolute-git-dir"])).trim();
464
467
  ensureTendIgnored(gitDir);
package/dist/index.d.ts CHANGED
@@ -404,7 +404,7 @@ declare class Snapshot {
404
404
  private readonly root;
405
405
  private readonly sha;
406
406
  private constructor();
407
- static capture(git: SimpleGit, cwd: string): Promise<Snapshot>;
407
+ static capture(_git: SimpleGit, cwd: string): Promise<Snapshot>;
408
408
  /** Serialize to a tiny object for `.tend/snapshot.json` (powers `undo` across invocations). */
409
409
  toJSON(): {
410
410
  cwd: string;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ClaudeSession, ConfigSchema, EventBus, FindingSchema, FindingStore, ReportBuilder, ReportSchema, Snapshot, addUsage, applyCliOverrides, assertGitRepo, buildProgram, changedFiles, changedVsHead, detectPackageManager, dispatch, filterToChanged, fingerprint, groupRemaining, isAvailable, loadConfig, normalize, orchestrate, planWork, renderSummary, retryCommand, revertFile, route, runScanner, scopeFindings, showCommand, trackForTool, zeroUsage } from "./config-bLQW135C.js";
1
+ import { ClaudeSession, ConfigSchema, EventBus, FindingSchema, FindingStore, ReportBuilder, ReportSchema, Snapshot, addUsage, applyCliOverrides, assertGitRepo, buildProgram, changedFiles, changedVsHead, detectPackageManager, dispatch, filterToChanged, fingerprint, groupRemaining, isAvailable, loadConfig, normalize, orchestrate, planWork, renderSummary, retryCommand, revertFile, route, runScanner, scopeFindings, showCommand, trackForTool, zeroUsage } from "./config-pmGLB0x1.js";
2
2
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { dirname } from "node:path";
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tend-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Audit a JS/TS repo with established scanners, then fix the findings with parallel AI sessions in a safe scan-fix-rescan loop.",
5
5
  "keywords": [
6
6
  "lint",