Commit Graph

8 Commits

Author SHA1 Message Date
Matt Godbolt
f94ff8332a Refactor: Split app.ts into smaller modules (#7681)
## Summary
This PR significantly improves maintainability by breaking up the 880+ line monolithic app.ts file into smaller, focused modules with proper testing. The code is now organized into dedicated modules under the lib/app/ directory, making the codebase more maintainable and testable.

## Key changes
- Extract functionality into modules under lib/app/ directory:
  - Command-line handling (cli.ts)
  - Configuration loading (config.ts)
  - Web server setup and middleware (server.ts)
  - Core application initialization (main.ts)
  - URL handlers, routing, rendering, and controllers
- Add comprehensive unit tests for all new modules
- Make compilationQueue non-optional in the compilation environment
- Improve separation of concerns with dedicated interfaces
- Ensure backward compatibility with existing functionality
- Maintain cross-platform compatibility (Windows/Linux)

## Benefits
- Improved code organization and modularity
- Enhanced testability with proper unit tests
- Better separation of concerns
- Reduced complexity in individual files
- Easier maintenance and future development

This refactoring is a significant step toward a more maintainable codebase while preserving all existing functionality.
2025-05-20 17:53:24 -05:00
Mats Jun Larsen
5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Ofek
63dd5e35a5 Various tsifications (#7025) 2024-10-27 15:28:38 +02:00
Ofek
2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Ofek
f715dc2932 More tsification (#6877)
About half way through. Only 708 tsification errors to go..
2024-09-28 10:32:36 +03:00
Jeremy Rifkin
c655af3097 Uncolorize winston when stdout isn't a tty (#5172)
Closes #5139
2023-06-21 15:43:39 -04:00
Patrick Quist
a08f6957f4 add option for custom papertrail hostname (#4912) 2023-03-30 23:44:19 +02:00
Matt Godbolt
00158d1ba1 TS-ify logger (#4431)
* TS-ify logger

Also redoes some pretty nasty morgan workarounds in favour of an actual real stream.

* Fix tests. and actually write some

* Formatting

* Add clarifying comment
2022-12-18 10:29:56 -05:00