Closed woodjme closed 2 months ago
resolves #58
[!WARNING]
Review failed
The pull request is closed.
The update overhauls the codebase, including introducing TypeScript, updating configurations, enhancing logging, and setting up an environment for a Unifi controller. Key updates comprise restructured ESLint and Prettier configurations, robust Dockerfile enhancements, comprehensive README revisions, and newly added utility and interface modules. Moreover, the project now leverages modern technologies and tools for better maintainability, improved readability, and enhanced developer experience.
File(s) | Change Summary |
---|---|
.env.example | Introduced environment variables for Unifi controller setup. |
.eslintrc.json | Updated environment settings, configurations, parser options, and added new plugins. |
.github/workflows/dev.yml, tags.yml | Reformatted steps in the workflows by removing unnecessary hyphens. |
.gitignore | Added dist/ to the ignore list. |
.husky/*, .huskyrc, .lintstagedrc | Introduced Husky and lint-staged configurations for pre-commit linting and commit message validation. |
.prettierignore, .prettierrc | Introduced/modified Prettier configuration and ignore rules. |
Dockerfile | Split build process into two stages for better efficiency. |
README.md | Significant updates including environment variable renaming, Typescript adoption, and Node.js upgrade. |
tests/…/basicauth.test.js | Added semicolons, updated setup, and improved readability of test cases. |
commitlint.config.js | Introduced commit linting configuration for conventional commits. |
docs/.vuepress/config.js | Updated and restructured user configuration settings. |
package.json | Updated version, script paths, dependencies, and minimum Node.js version. |
public/noAuth.html | Made significant semantic and structural updates. |
src/index.ts | Introduced core functionality for environment configuration and server initialization. |
src/interfaces/UnifiApiService.ts | Added interface UnifiApiService for Unifi API communication. |
src/routes/authorise.ts | Implemented an Express.js route for Unifi device authorization. |
src/routes/index.ts | Introduced route handler for the root path with session management and logging. |
src/server/index.ts | Set up an Express server with middleware and routing. |
src/types/global.d.ts | Added global type declarations for logger and extended express-session properties. |
src/unifi/index.ts | Introduced functions for interacting with Unifi API, handling responses, and error conditions. |
src/utils/axios.ts | Created Axios instance with custom interceptors for request and response logging. |
src/utils/config.ts | Added configuration module with validation and environment variable checks. |
src/utils/logAuthDrivers.ts | Introduced functions for logging to webhooks and Google Sheets. |
src/utils/logger.ts | Set up logging system using pino , tailored for different environments. |
tsconfig.json | Updated TypeScript compilation options with strict mode and directory settings. |
views/connecting.ejs | Added loading page for checking internet connectivity and redirecting on success. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
feat: unifi api service feat: typescript
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
.gitignore
and.prettierignore
updates.Style
noAuth.html
.Refactor