Enhance project structure and testing capabilities

- Updated .dockerignore to include additional logs and IDE files, improving Docker build efficiency.
- Added .eslintrc.json for TypeScript linting configuration, ensuring code quality and consistency.
- Refactored Dockerfile to streamline the build process and utilize a slimmer Node.js image.
- Introduced jest-resolver.cjs and jest.setup.js for improved Jest testing configuration and setup.
- Updated jest.config.js to support ESM and added new test patterns for better test organization.
- Enhanced TypeScript schemas to include new device types (media_player, fan, lock, vacuum, scene, script, camera) for comprehensive validation.
- Added unit tests for device schemas and Home Assistant connection, improving test coverage and reliability.
- Updated README.md with new testing instructions and device control examples, enhancing user guidance.
This commit is contained in:
jango-blockchained
2024-12-17 15:07:40 +01:00
parent 3cd1ae58a5
commit 108524c7c4
30 changed files with 2385 additions and 130 deletions

View File

@@ -1,51 +1,37 @@
{
"name": "@strandbrown/homeassistant-mcp",
"version": "0.1.0",
"description": "Home Assistant Model Context Protocol Server",
"description": "Model Context Protocol Server for Home Assistant",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "jest",
"prepare": "npm run build",
"build": "npx tsc",
"start": "node dist/index.js",
"dev": "ts-node src/index.ts",
"build:start": "npm run build && npm run start"
"dev": "tsx watch src/index.ts",
"test": "jest --config=jest.config.js",
"lint": "eslint src --ext .ts",
"lint:fix": "eslint src --ext .ts --fix",
"prepare": "npm run build",
"clean": "rimraf dist",
"types:check": "tsc --noEmit",
"types:install": "npm install --save-dev @types/node @types/jest"
},
"author": "Tevon Strand-Brown",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/tevonsb/homeassistant-mcp.git"
},
"keywords": [
"home-assistant",
"mcp",
"model-context-protocol"
],
"dependencies": {
"@digital-alchemy/core": "^24.11.4",
"@digital-alchemy/hass": "^24.11.4",
"@modelcontextprotocol/sdk": "^1.0.3",
"dotenv": "^16.4.7",
"dotenv": "^16.3.1",
"litemcp": "^0.7.0",
"zod": "^3.24.1",
"zod-to-json-schema": "^3.24.1"
"zod": "^3.22.4"
},
"devDependencies": {
"@digital-alchemy/type-writer": "^24.11.3",
"@types/express": "^5.0.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.0",
"@types/socket.io": "^3.0.1",
"jest": "^29.7.0",
"nodemon": "^3.0.2",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
"@types/jest": "^28.1.8",
"@types/node": "^20.17.10",
"jest": "^28.1.3",
"semver": "^6.3.1",
"ts-jest": "^28.0.8",
"tsx": "^4.19.2",
"typescript": "^4.9.5"
},
"type": "module",
"publishConfig": {
"access": "public"
}
"author": "Jango Blockchained",
"license": "MIT"
}