feat(ccw): migrate backend to TypeScript

- Convert 40 JS files to TypeScript (CLI, tools, core, MCP server)
- Add Zod for runtime parameter validation
- Add type definitions in src/types/
- Keep src/templates/ as JavaScript (dashboard frontend)
- Update bin entries to use dist/
- Add tsconfig.json with strict mode
- Add backward-compatible exports for tests
- All 39 tests passing

Breaking changes: None (backward compatible)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-12-13 10:43:15 +08:00
parent d4e59770d0
commit 25ac862f46
93 changed files with 5531 additions and 9302 deletions

View File

@@ -3,12 +3,15 @@
"version": "6.1.4",
"description": "Claude Code Workflow CLI - Dashboard viewer for workflow sessions and reviews",
"type": "module",
"main": "src/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"ccw": "./bin/ccw.js",
"ccw-mcp": "./bin/ccw-mcp.js"
},
"scripts": {
"build": "tsc",
"dev": "tsx watch src/cli.ts",
"test": "node --test tests/*.test.js",
"test:codexlens": "node --test tests/codex-lens*.test.js",
"test:mcp": "node --test tests/mcp-server.test.js",
@@ -36,10 +39,12 @@
"gradient-string": "^2.0.2",
"inquirer": "^9.2.0",
"open": "^9.1.0",
"ora": "^7.0.0"
"ora": "^7.0.0",
"zod": "^4.1.13"
},
"files": [
"bin/",
"dist/",
"src/",
"README.md",
"LICENSE"
@@ -47,5 +52,12 @@
"repository": {
"type": "git",
"url": "https://github.com/claude-code-workflow/ccw"
},
"devDependencies": {
"@types/gradient-string": "^1.1.6",
"@types/inquirer": "^9.0.9",
"@types/node": "^25.0.1",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
}
}