@simonfestl/husky-cli 0.7.1 → 0.7.2

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/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Husky CLI
2
2
 
3
+ [![CLI Tests](https://github.com/simon-sfxecom/huskyv0/actions/workflows/cli-tests.yml/badge.svg)](https://github.com/simon-sfxecom/huskyv0/actions/workflows/cli-tests.yml)
4
+ [![codecov](https://codecov.io/gh/simon-sfxecom/huskyv0/branch/main/graph/badge.svg?flag=cli)](https://codecov.io/gh/simon-sfxecom/huskyv0)
5
+
3
6
  CLI for Huskyv0 Task Orchestration with Claude Agent SDK integration.
4
7
 
5
8
  **Part of the [huskyv0 monorepo](https://github.com/simon-sfxecom/huskyv0)**
@@ -378,6 +381,47 @@ husky --version
378
381
  - Configuration management
379
382
  - API key authentication
380
383
 
384
+ ## Development
385
+
386
+ ### Testing
387
+
388
+ The CLI has comprehensive test coverage using Vitest:
389
+
390
+ ```bash
391
+ # Run all tests
392
+ npm test
393
+
394
+ # Run tests in watch mode
395
+ npm run test:watch
396
+
397
+ # Run with coverage
398
+ npm run test:coverage
399
+
400
+ # Run specific test file
401
+ npm test tests/unit/commands/config.test.ts
402
+ ```
403
+
404
+ **Test Structure:**
405
+ - `tests/setup.ts` - Global test configuration (MSW, memfs, mocks)
406
+ - `tests/unit/` - Unit tests for individual modules
407
+ - `tests/integration/` - Integration tests for workflows
408
+ - `tests/helpers/` - Reusable mocking utilities
409
+
410
+ **Current Coverage:**
411
+ - Config Command: ~29% lines, 60% functions
412
+ - Worktree Library: ~55% lines, 70% branches, 65% functions
413
+ - Total: 29 tests across 4 test files
414
+
415
+ ### Building
416
+
417
+ ```bash
418
+ # Build TypeScript
419
+ npm run build
420
+
421
+ # Watch mode for development
422
+ npm run dev
423
+ ```
424
+
381
425
  ## License
382
426
 
383
427
  MIT
@@ -919,7 +919,8 @@ function printTasks(tasks) {
919
919
  for (const task of statusTasks) {
920
920
  const agentStr = task.agent ? ` (${task.agent})` : "";
921
921
  const doneStr = status === "done" ? " ✓" : "";
922
- console.log(` ${task.id} ${task.title.slice(0, 30).padEnd(30)} ${task.priority}${agentStr}${doneStr}`);
922
+ const projectStr = (task.projectName || task.projectId)?.slice(0, 15).padEnd(15) || "—".padEnd(15);
923
+ console.log(` ${task.id.slice(0, 10).padEnd(10)} ${task.title.slice(0, 25).padEnd(25)} ${projectStr} ${task.priority.padEnd(6)}${agentStr}${doneStr}`);
923
924
  }
924
925
  }
925
926
  console.log("");
@@ -168,10 +168,11 @@ worktreeCommand
168
168
  process.exit(1);
169
169
  }
170
170
  });
171
- // husky worktree remove <session-name>
171
+ // husky worktree remove <session-name> (alias: delete)
172
172
  worktreeCommand
173
173
  .command("remove <session-name>")
174
- .description("Remove a worktree")
174
+ .alias("delete")
175
+ .description("Remove a worktree (alias: delete)")
175
176
  .option("-p, --project <path>", "Project directory (default: current directory)")
176
177
  .option("--delete-branch", "Also delete the associated branch")
177
178
  .option("--force", "Force removal even with uncommitted changes")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonfestl/husky-cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "CLI for Huskyv0 Task Orchestration with Claude Agent SDK",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,12 @@
10
10
  "scripts": {
11
11
  "build": "tsc",
12
12
  "dev": "tsc --watch",
13
- "start": "node dist/index.js"
13
+ "start": "node dist/index.js",
14
+ "test": "vitest run",
15
+ "test:watch": "vitest",
16
+ "test:coverage": "vitest run --coverage",
17
+ "test:unit": "vitest run tests/unit",
18
+ "test:integration": "vitest run tests/integration"
14
19
  },
15
20
  "dependencies": {
16
21
  "@anthropic-ai/claude-code": "^1.0.0",
@@ -19,7 +24,11 @@
19
24
  },
20
25
  "devDependencies": {
21
26
  "@types/node": "^22",
22
- "typescript": "^5"
27
+ "typescript": "^5",
28
+ "vitest": "^2.1.8",
29
+ "@vitest/coverage-v8": "^2.1.8",
30
+ "msw": "^2.6.8",
31
+ "memfs": "^4.14.0"
23
32
  },
24
33
  "files": [
25
34
  "dist"