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 7610147a19
commit ada5ea4646
30 changed files with 2385 additions and 130 deletions

View File

@@ -4,21 +4,43 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./dist",
"rootDir": "./src",
"rootDir": "./",
"baseUrl": "./",
"paths": {
"@src/*": [
"src/*"
],
"@tests/*": [
"__tests__/*"
]
},
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"declaration": true,
"sourceMap": true
"sourceMap": true,
"allowJs": true,
"types": [
"node",
"jest"
],
"typeRoots": [
"./node_modules/@types",
"./node_modules/@types/node"
],
"lib": [
"ES2022",
"DOM"
]
},
"include": [
"src/**/*"
"src/**/*",
"__tests__/**/*.test.ts"
],
"exclude": [
"node_modules",
"dist",
"__tests__"
"dist"
]
}