- Introduce functions to validate CLI inputs like paths, identifiers, and environment variables
- Add error messages for invalid inputs to support user feedback
- Include unit tests to ensure correctness and robustness of validation logic
- Adds inline comments to JSON files to improve readability
- Renames `.json` files to `.jsonc` to support comments
- Improves organization of translation entries
- Add tests to verify rollback behavior when file writing fails
- Simulate various error scenarios to ensure proper cleanup
- Log rollback failures when file deletion is prohibited
- Centralize CLI text strings using the i18n module for localization
- Refactor `createCommand` and `createCli` to improve modularity
- Update logging and error messages to use translated strings
- Add tests for `loadLocale` to verify translations load correctly
- Add tests for `t` to ensure fallback behavior for missing keys
- Add tests for `getCurrentLanguage` to validate language detection logic
- Introduce functions to initialize and load locale files dynamically
- Add support for translation keys with placeholder replacements
- Default to English if locale files are missing or not found
- Determine system language using environment variables
- Add `--run-as` option to specify user for system-wide timers
- Add `--home` option to set the HOME environment variable
- Add `--cwd` option to define the working directory
- Update tests to validate new options and behavior
- Add error handling and rollback logic for unit file writes
- Prevent partial file writes by removing created files on failure
- Update tests to reflect new return type and error handling
- Introduces a function to retrieve the application version
- Returns 'dev' if the version file is missing and 'unknown' for other errors
- Exports the new utility for use in other modules
- Introduces a CLI tool for creating systemd .timer and .service units
- Adds options for configuring unit names, commands, scheduling, and more
- Supports dry-run mode and user-level unit file generation
- Introduces tests to validate service and timer unit generation
- Covers description, dependencies, environment variables, and logging
- Ensures generated units meet expected configurations
- Introduces a utility function to extract and sanitize job names
from executable paths by removing paths, extensions, and special
characters.
- Adds unit tests to validate function behavior with various inputs.
- Add tests for writing .service and .timer files with `writeUnitFiles`
- Add tests for resolving target paths with `resolveUnitTargetPath`
- Ensure proper file creation, content validation, and path resolution