- Implemented new methods in PrinterClient to set speed factor, extrude factor, max velocity, max acceleration, square corner velocity, and min cruise ratio.
- Enhanced error handling and logging for each method to ensure robust operation and user feedback.
- Updated PrinterManager to handle new actions for these settings, allowing for dynamic adjustments during operation.
- Included pdfjs-dist version 5.6.205 in both package.json and bun.lock to enhance PDF handling capabilities.
- Updated related dependencies to ensure compatibility with the new pdfjs-dist version.
- Introduced a new Windows Installer XML (WXS) file for packaging the Farm Control Server as an MSI.
- Added a PowerShell script to build the MSI from the WXS file.
- Implemented a new script to finalize desktop artifacts, handling the publication of macOS and Windows packages.
- Updated the Linux build script to improve artifact naming and organization.
- Enhanced the Electrobun configuration to include a post-package script for finalizing desktop artifacts.
- Replaced ES module import of `vite-plugin-svgo` with CommonJS `require` to ensure compatibility with the current module system.
- Added `createRequire` to facilitate the CommonJS import in an ES module context.
- Updated the exit code handling in the Linux binary build script to use the `exited` property from the compile result.
- Simplified the process of exiting the script on failure, enhancing clarity and reliability.
- Renamed the function from `ensureBunInstalled` to `checkBun` for clarity.
- Simplified the Bun version check process by removing installation commands, focusing solely on verifying Bun's presence.
- Updated stage names in the CI pipeline to reflect the new function and improve readability.
- Introduced helper functions to manage Bun installation paths for both Unix and Windows environments.
- Wrapped Bun installation and dependency setup stages in a new `withBun` closure for improved readability and organization.
- Ensured consistent handling of Bun installation across different stages of the CI pipeline.
- Simplified the error handling in the Bun installation script by removing the 'pipefail' option.
- Ensured the script remains robust while maintaining compatibility across Unix environments.
- Updated the path separator from backslashes to forward slashes for consistency across environments.
- Ensured the PATH variable is correctly set for Bun installation on Windows systems.
- Introduced a function to ensure Bun is installed on both Unix and Windows environments.
- Updated the Jenkinsfile to call this function during the setup stages, improving the reliability of the build process.
- Ensured the PATH is correctly set for Bun after installation.
- Modify the Linux package build command in package.json to include the --no-bytecode flag for improved compatibility with ESM packages.
- Refactor pdfUtils.js to handle dynamic imports more robustly, ensuring compatibility with pkg snapshots and improving error handling for ESM modules.
- Simplify image processing logic by removing unnecessary default property access for the sharp module.
- Replace static imports with dynamic imports using a helper function to improve compatibility with pkg snapshots.
- Simplify options handling by destructuring parameters, enhancing readability and maintainability.
- Update image processing logic to utilize destructured width and height options for resizing.
- Implement retry logic for file uploads in PrinterFileManager to enhance reliability.
- Update progress tracking in PrinterClient to streamline deployment feedback.
- Simplify progress callback management in FileManager for improved clarity.
- Enhance logging for upload processes and error handling across components.
- Refactor commandline.js to improve server status checks and OTP authentication handling.
- Introduce new functions for checking server status, printing server information, and setting log levels.
- Add support for command line flags to manage log levels and server information display.
- Implement logging level management in localserver.js, allowing dynamic log level adjustments via API.
- Create a new logging.js module to centralize log level validation and application.
- Update commandlineutils.js to include utility functions for flag handling and improved CLI output.
- Update logging in PrinterDatabase to correctly reference the printer state type.
- Remove redundant call to stopWaiting() in PrinterManager for cleaner code execution.
- Ensure config saving in SocketClient occurs unconditionally for improved reliability.
- Introduce functions to determine and create default data directories for both production and development environments in config.js.
- Update commandline.js to display the configured data directory and config path in the command line output.
- Modify filemanager.js to ensure the existence of a dedicated files directory within the data directory.
- Enhance localserver.js to include the data directory and config path in the server response, providing better context for users.
- Introduce a new command line utility in commandline.js to manage server status checks and OTP authentication.
- Refactor index.js to utilize the new command line handling, improving clarity and separation of concerns.
- Enhance localserver.js to include connection status in the server response, providing more detailed information about the server state.
- Introduce a check for the Farm Control Server status during initialization, providing clearer feedback when the server is not running.
- Improve error handling by logging specific failure messages instead of throwing errors, enhancing user experience during startup.
- Downgrade chalk from version 6.0.0 to 5.4.1 in package.json and pnpm-lock.yaml to ensure compatibility.
- Add a call to stopWaiting() in the server initialization process to improve user experience during startup.
- Change log level in development config from "debug" to "info" for improved clarity.
- Add new dependencies: chalk and cli-spinners for enhanced CLI output.
- Introduce command line utility functions for better logging and spinner management.
- Refactor various components to utilize the new CLI logging methods, improving user feedback during operations.
- Update package and lock files to reflect new dependencies.
Add a new method to handle host updates in SocketClient, ensuring that updates are processed correctly based on the host ID. Additionally, improve logging in index.js to include the first tag of the host for better visibility. This change streamlines the management of host information and enhances the overall logging clarity.
Refactor the logging in index.js to handle cases where host tags are absent, ensuring a clear output of "Tags: n/a" when no tags are available. Additionally, simplify the build information logging for better readability by consolidating logger.info calls.
Refactor build-linux-bundle.mjs to include package version and build number from environment variables and package.json. Update headless.js to streamline initialization and improve error handling. Introduce serverVersion.js to centralize version information retrieval, replacing redundant code in localserver.js. Enhance logging in index.js to display build number and version more clearly.
Replace the previous headless mode implementation in headless.js with a streamlined init function in index.js that accepts options. This change improves modularity and error handling during initialization. The logger setup and socket client connection have been removed from headless.js, centralizing the logic in index.js.
Add a function to write build metadata to src/buildInfo.json during the build process in Jenkinsfile. Update local server to include version and build number in the /info endpoint response. Modify index.js to log detailed host information when the --info flag is used. Update .gitignore to include src/buildInfo.json and adjust config.json with new host credentials.
Introduce a new before-remove.sh script to stop and disable the farmcontrol-server service before package removal. Update after-remove.sh to only reload systemd, simplifying the uninstallation process. Modify build-linux-packages.sh to include the new before-remove script in the packaging process.
Add a LocalServer class to handle OTP authentication requests and server status checks. Update index.js to integrate local server functionality, including checks for server status and OTP authentication flow. Enhance SocketClient with connection waiting and improved OTP authentication handling. Update config.json with a new authCode for the host.
Introduce a new pdfUtils.js file for on-demand PDF conversion using pdf-to-img and sharp. Update package.json to include new build scripts for Linux packaging, enhancing the build process with public package handling. Add .npmrc for public hoisting patterns and create build-linux-packages.sh for streamlined package creation.