20 Commits

Author SHA1 Message Date
e7bf650e82 Enhance document size management in DocumentPrinterClient and related interfaces
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
- Introduced a `getDocumentSizeId` utility function to streamline document size ID retrieval.
- Updated `DocumentPrinterClient` to manage subscriptions for current document sizes, ensuring accurate updates and handling of document size changes.
- Enhanced `DocumentPrinterManager` to handle document size updates and propagate changes to connected clients.
- Improved `CupsInterface` and `ReceiptInterface` to support document size resolution and default media application based on current document sizes.
- Added detailed logging for document size updates and error handling to improve debugging and user feedback.
2026-09-02 20:55:59 +01:00
d04e722366 Refactor HostManager and SocketClient for improved authentication and event handling
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
- Introduced a dedicated `HostManager` class to encapsulate host-related logic, including authentication and event subscription.
- Enhanced authentication methods in `HostManager` to handle OTP and standard authentication processes.
- Updated `SocketClient` to delegate host-related actions to `HostManager`, streamlining the connection and event handling workflow.
- Improved logging and configuration management during host authentication and updates.
- Removed redundant code from `SocketClient`, enhancing maintainability and clarity.
2026-09-01 13:03:57 +01:00
0dc7ed3f92 Enhance document printing progress tracking and rendering functionality
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
- Updated the `DocumentPrinterClient` to include detailed progress tracking during the deployment process, improving user feedback.
- Modified the `deploy` methods in `CupsInterface` and `ReceiptInterface` to accept an `onProgress` callback for real-time progress updates.
- Enhanced the `SocketClient` to support rendering templates with progress notifications, allowing for better handling of asynchronous rendering tasks.
2026-08-22 14:03:56 +01:00
e03a56bb78 Update SocketClient to include padding parameter in API requests
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
- Modified the API request parameters in the `SocketClient` class to include a `padding` option set to `false` for both PDF and image type requests, enhancing control over response formatting.
2026-08-21 22:39:27 +01:00
470a0edd80 Enhance job state update functionality in DocumentPrinterClient
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
- Introduced a `notify` parameter in the `editObject` method of `SocketClient` to control notification behavior during job state updates.
- Updated the `updateJobState` method in `DocumentPrinterClient` to conditionally set the `notify` parameter based on the job state type, improving the handling of job notifications.
2026-08-19 18:58:38 +01:00
bec253cde8 Refactor receipt printing and template rendering logic
- Updated the `ReceiptInterface` to await the `printImageBuffer` method for proper asynchronous handling.
- Modified the `renderTemplateJPG` method in `SocketClient` to accept an image type parameter and improved error handling for template download failures.
- Enhanced the response handling to correctly parse and return image data based on the content type.
2026-08-19 18:19:49 +01:00
d4f3ba0fca Add pdfjs-dist dependency to package.json and bun.lock
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
- 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.
2026-07-28 23:15:44 +01:00
7d8031e009 Route IPC through desktop notify and remove CLI OTP prompting.
OTP authentication is now handled by the desktop UI instead of stdin prompts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 22:03:11 +01:00
e2600f8242 Refactor logging in PrinterDatabase and PrinterManager, and streamline config saving in SocketClient
- 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.
2026-07-27 23:15:20 +01:00
ee9895d562 Update configuration and enhance CLI logging functionality
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
- 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.
2026-07-27 02:03:17 +01:00
3f5f02b087 Enhance SocketClient functionality and improve host update handling
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
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.
2026-07-26 23:42:48 +01:00
a62df6a5c6 Enhance build metadata handling and server info logging
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
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.
2026-07-26 23:14:04 +01:00
2e95075d3e Implement local server for OTP authentication and enhance socket client functionality
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good
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.
2026-07-26 22:48:02 +01:00
ffa6d84251 Update dependencies, improve document printer management, and add workspace configuration
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
2026-06-15 00:53:28 +01:00
7dbe7da4ee Overhauled server code.
Some checks reported errors
farmcontrol/farmcontrol-server/pipeline/head Something is wrong with the build of this commit
2025-12-28 21:46:58 +00:00
5db74f2c5c New version of farmcontrol-server. Includes electron UI, connects only via WS and authenticates using OTP and then auth code.
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
2025-09-05 23:33:21 +01:00
90d031c5fe Added CI Support and other things. 2025-06-01 20:44:06 +01:00
2ac65ec717 Refactored and fixed printer stated system. Added filament loading and stock. 2025-05-19 00:28:42 +01:00
81196897fa Updated to update the DB and handle print commands. 2025-05-09 22:20:37 +01:00
92906e940d Initial Commit 2025-04-13 18:31:40 +00:00