Merged
Conversation
- Added build scripts for JavaScript and asset files in package.json. - Introduced a new backup configuration file (config_backup.js) for fallback settings. - Updated loadSettings function to utilize the new backup configuration. - Refactored import statements for consistency in naming conventions. - Commented out debug-related code in bootstrapApp.js and liveChatSpam.js. - Removed the provisional test file (provisorio_test.js) as it is no longer needed.
Refactored testLiveChatSpam to a dedicated debug zone and simplified its implementation. Added a debug method to WsFunctions. Modified express_bootstrap to return a test value when invoked with 'test', and updated its test to match. These changes improve testability and debugging support.
Refactored the application bootstrap process to use a class-based approach with robust error handling and sequential module initialization. Added new debugBootstrap and logManager modules for debugging and future logging capabilities. Updated websocket_bootstrap to a singleton class with improved initialization and instance management. Adjusted liveChatSpam to use the new websocket_bootstrap API.
Introduces a robust logManager with multi-level logging and file persistence, integrates it into bootstrapApp and loadSettings, and removes legacy logging code. Updates config.json to use a new dev_express_port, simplifies src/index.js, and stubs out index_test.js. Also cleans up unused code in dataControl.js and minor adjustments in related modules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and refactors to the StreamChatRelay application's initialization process, configuration, and developer tooling. The main focus is on making the bootstrap process more robust and modular, adding a structured logging system, and enhancing the build workflow for JavaScript and asset files.
Key changes include:
Application Bootstrap & Initialization
bootstrapAppclass with anignitemethod. This method initializes modules sequentially, tracks which modules were started, and logs the results using the new logging system. It also adds safer error handling and modular initialization for each component. (src/services/app/bootstrapApp.js,src/index.js) [1] [2]debugBootstrapclass as a placeholder for future debug-related initialization, currently calling a test method on the WebSocket bootstrap. (src/services/app/debugBootstrap.js)Logging System
logManagerclass that supports multiple log levels (debug, info, warn, error, critical), colored console output, and persistent log files organized by date. This system is used throughout the bootstrap process for consistent and informative logging. (src/services/app/logManager.js)src/services/app/bootstrapApp.js,src/index.js) [1] [2]Build & Developer Tooling
package.jsonscripts to add JavaScript bundling and minification viaesbuild, asset copying withcpy, and a combinedbuildscript for streamlined builds. New dependencies for these tools and forterserwere added. (package.json) [1] [2]Configuration & Documentation
3131to3232inconfig.json. (src/config.json)index.jsandbootstrapApp.js. (src/index.js,src/services/app/bootstrapApp.js) [1] [2]Logging Output
src/logs/log_2026-01-24.txt)These changes make the application's startup process more reliable, easier to debug, and better suited for future maintenance and feature expansion.