17 KiB
Changelog
2025-03-25 - 2.5.1 - fix(snmp)
Fix Eaton UPS support by updating power status OID and adjusting battery runtime conversion.
- Updated Eaton UPS power status OID to '1.3.6.1.4.1.534.1.4.4.0' to correctly detect online/battery status.
- Added conversion for Eaton UPS battery runtime from seconds to minutes in SNMP manager.
2025-03-25 - 2.5.0 - feat(cli)
Automatically restart running NUPST service after configuration changes in interactive setup
- Added restartServiceIfRunning() to check and restart the service if it's active.
- Invoked the restart function post-setup to apply configuration changes immediately.
2025-03-25 - 2.4.8 - fix(installer)
Improve Git dependency handling and repository cloning in install.sh
- Add explicit check for git installation and prompt the user interactively if git is missing.
- Auto-install git when '-y' flag is provided in non-interactive mode.
- Ensure proper cloning of the repository when running the installer outside the repo.
2025-03-25 - 2.4.7 - fix(readme)
Update installation instructions to combine download and execution into a single command for clarity
- Method 1 now uses a unified one-line command to download and run the install script
2025-03-25 - 2.4.6 - fix(installer)
Improve installation instructions for interactive and non-interactive setups
- Changed install.sh to require explicit download of the install script and updated error messages for non-interactive modes
- Updated readme.md to include three distinct installation methods with clear command examples
2025-03-25 - 2.4.5 - fix(install)
Improve interactive terminal detection and update installation instructions
- Enhanced install.sh to better detect non-interactive environments and provide clearer guidance for both interactive and non-interactive installations
- Updated README.md quick install instructions to recommend process substitution and clarify auto-yes usage
2025-03-25 - 2.4.4 - fix(install)
Improve interactive mode detection and non-interactive installation handling in install.sh
- Detect and warn when running without a controlling terminal
- Attempt to use /dev/tty for user input when possible
- Update prompts and error messages for auto-installation of dependencies
- Clarify installation instructions in readme for interactive and non-interactive modes
2025-03-25 - 2.4.3 - fix(readme)
Update Quick Install command syntax in readme for auto-yes installation
- Changed installation command to use: curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash -c "bash -s -- -y"
2025-03-25 - 2.4.2 - fix(daemon)
Refactor shutdown initiation logic in daemon by moving the initiateShutdown and monitorDuringShutdown methods from the SNMP manager to the daemon, and update calls accordingly
- Moved initiateShutdown and monitorDuringShutdown to the daemon class for improved cohesion
- Updated references in the daemon to call its own shutdown method instead of the SNMP manager
- Removed redundant initiateShutdown method from the SNMP manager
2025-03-25 - 2.4.1 - fix(docs)
Update readme with detailed legal and trademark guidance
- Clarified legal section by adding trademark and company information
- Ensured users understand that licensing terms do not imply endorsement by the company
2025-03-25 - 2.4.0 - feat(installer)
Add auto-yes flag to installer and update installation documentation
- Enhance install.sh to parse -y/--yes and -h/--help options, automating git installation when auto-yes is provided
- Improve user prompts for dependency installation and provide clearer instructions
- Update readme.md to document new installer options and enhanced file system and service changes details
2025-03-25 - 2.3.0 - feat(installer/cli)
Add OS detection and git auto-installation support to install.sh and improve service setup prompt in CLI
- Implemented helper functions in install.sh to detect OS type and automatically install git if missing
- Prompt user for git installation if not present before cloning the repository
- Enhanced CLI service setup flow to offer starting the NUPST service immediately after installation
2025-03-25 - 2.2.0 - feat(cli)
Add 'config' command to display current configuration and update CLI help
- Introduce new 'config' command to show SNMP settings, thresholds, and configuration file location
- Update help text to include details for 'nupst config' command
2025-03-25 - 2.1.0 - feat(cli)
Add uninstall command to CLI and update shutdown delay for graceful VM shutdown
- Implement uninstall command in ts/cli.ts that locates and executes uninstall.sh with user prompts
- Update uninstall.sh to support environment variables for configuration and repository removal
- Increase shutdown delay in ts/snmp/manager.ts from 1 minute to 5 minutes to allow VMs more time to shut down
2025-03-25 - 2.0.1 - fix(cli/systemd)
Fix status command to pass debug flag and improve systemd status logging output
- ts/cli.ts: Now extracts debug options from process arguments and passes debug mode to getStatus.
- ts/systemd.ts: Updated getStatus to accept a debugMode parameter, enabling detailed SNMP debug logging, explicitly reloading configuration, and printing connection details.
2025-03-25 - 2.0.0 - BREAKING CHANGE(snmp)
refactor: update SNMP type definitions and interface names for consistency
- Renamed SnmpConfig to ISnmpConfig, OIDSet to IOidSet, UpsStatus to IUpsStatus, and UpsModel to TUpsModel in ts/snmp/types.ts.
- Updated internal references in ts/daemon.ts, ts/snmp/index.ts, ts/snmp/manager.ts, ts/snmp/oid-sets.ts, ts/snmp/packet-creator.ts, and ts/snmp/packet-parser.ts to use the new interface names.
2025-03-25 - 1.10.1 - fix(systemd/readme)
Improve README documentation and fix UPS status retrieval in systemd service
- Updated README features and installation instructions to clarify SNMP version support, UPS models, and configuration
- Modified default SNMP host to '192.168.1.100' and added 'upsModel' property in configuration examples
- Enhanced instructions for real-time log viewing and update process in README
- Fixed systemd.ts to use a test configuration with an appropriate timeout when fetching UPS status
2025-03-25 - 1.10.0 - feat(core)
Add update checking and version logging across startup components
- In daemon.ts, log version info on startup and check for updates in the background using npm registry response
- In nupst.ts, implement getVersion, checkForUpdates, getUpdateStatus, and compareVersions functions with update notifications
- Establish bidirectional reference between Nupst and NupstSnmp to support version logging
- Update systemd service status output to include version information
2025-03-25 - 1.9.0 - feat(cli)
Add update command to CLI to update NUPST from repository and refresh the systemd service
- Integrate 'update' subcommand in CLI command parser
- Update documentation and help output to include new command
- Implement update process that fetches changes from git, runs install.sh/setup.sh, and refreshes systemd service if installed
2025-03-25 - 1.8.2 - fix(cli)
Refactor logs command to use child_process spawn for real-time log tailing
- Replaced execSync call with spawn to properly follow logs
- Forward SIGINT to the spawned process for graceful termination
- Await the child process exit to ensure clean shutdown of the CLI log command
2025-03-25 - 1.8.1 - fix(systemd)
Update ExecStart in systemd service template to use /opt/nupst/bin/nupst for daemon startup
- Changed ExecStart from '/usr/bin/nupst daemon-start' to '/opt/nupst/bin/nupst daemon-start' in the systemd service file
- Ensures the service uses the correct binary installation path
2025-03-25 - 1.8.0 - feat(core)
Enhance SNMP module and interactive CLI setup for UPS shutdown
- Refactored SNMP packet parsing and encoding utilities for clearer error handling and debugging
- Improved systemd service management with detailed logging during installation and control
- Enhanced interactive CLI setup process for configuring SNMP settings and UPS models
- Expanded test coverage with simulated SNMP responses for various response types
2025-03-25 - 1.7.6 - fix(core)
Refactor SNMP, systemd, and CLI modules to improve error handling, logging, and code clarity
- Removed unused dependency 'net-snmp' from package.json
- Extracted helper functions for SNMP packet creation and parsing (using SnmpEncoder, SnmpPacketCreator and SnmpPacketParser)
- Improved debug logging and added detailed documentation comments across SNMP, systemd, CLI and daemon modules
- Refactored systemd service management to extract status display and service disabling logic
- Updated test suite to use proper modular methods from the new SNMP utilities
2025-03-25 - 1.7.5 - fix(cli)
Enable SNMP debug mode in CLI commands and update debug flag handling in daemon-start and test; bump version to 1.7.4
- Call enableDebug() on SNMP client earlier in command parsing
- Pass debug flag to 'daemon-start' and 'test' commands for consistent debug output
- Update package version from 1.7.3 to 1.7.4
2025-03-25 - 1.7.3 - fix(SNMP)
Refine SNMP packet creation and response parsing for more reliable UPS status monitoring
- Improve error handling and fallback logic when parsing SNMP responses
- Optimize TimeTicks conversion for CyberPower UPS devices
- Enhance test coverage for various UPS scenarios
2025-03-25 - 1.7.2 - fix(core)
Refactor internal SNMP response parsing and enhance daemon logging for improved error reporting and clarity.
- Improved fallback and error handling in SNMP response parsing
- Enhanced logging messages in daemon and systemd service management
- Minor refactoring for better maintainability without functional changes
2025-03-25 - 1.7.1 - fix(snmp-cli)
Improve SNMP response parsing and CLI UPS connection timeout handling
- Expand parsing loop in SNMP responses to capture Gauge32 and Timeticks values
- Add detailed debug logging for both SNMP v1/v2 and v3 responses
- Configure CLI test commands to use a shortened timeout for UPS connection tests
2025-03-25 - 1.7.0 - feat(SNMP/UPS)
Add UPS model selection and custom OIDs support to handle different UPS brands
- Introduce distinct OID sets for CyberPower, APC, Eaton, TrippLite, Liebert, and a custom option
- Update interactive setup to prompt for UPS model selection and custom OID entry when needed
- Refactor SNMP status retrieval to dynamically select the appropriate OIDs based on the configured UPS model
- Extend default configuration with an upsModel property for consistent behavior
2025-03-25 - 1.6.0 - feat(cli,snmp)
Enhance debug logging and add debug mode support in CLI and SNMP modules
- Enable debug flags (--debug, -d) in CLI to trigger detailed SNMP logging
- Pass debug mode options to daemonStart and test commands for improved diagnostics
- Add enableDebug method to the SNMP module for on-demand debug logging
- Improve timeout and discovery logging details for streamlined troubleshooting
2025-03-25 - 1.5.0 - feat(cli)
Enhance CLI output: display SNMPv3 auth/priv details and support timeout customization during setup
- Display authentication and privacy protocol details when SNMP version is 3
- Show timeout value in the configuration test output
- Clear out unused authentication or privacy settings based on selected security level
- Allow users to customize SNMP timeout during interactive setup
2025-03-25 - 1.4.1 - fix(version)
Bump patch version for consistency with commit info
2025-03-25 - 1.4.0 - feat(snmp)
Implement native SNMPv3 support with simulated encryption and enhanced authentication handling.
- Add fully native SNMPv3 GET request implementation replacing the snmpwalk fallback
- Simulate encryption for authPriv using AES and DES protocols
- Enhance SNMP response parser to properly handle SNMPv3 responses
- Introduce detailed security parameter management for SNMPv3
2025-03-25 - 1.3.1 - fix(cli)
Remove redundant SNMP tools checks in CLI and Systemd modules
- Eliminate unnecessary snmpwalk dependency checks in the test command and interactive setup flow.
- Adjust systemd configuration file check to avoid external dependency verification.
2025-03-25 - 1.3.0 - feat(cli)
add test command to verify UPS SNMP configuration and connectivity
- Introduce a new 'test' command in the CLI to check the SNMP configuration and UPS connection.
- Validate installation of SNMP tools and configuration file before testing.
- Output UPS status details and compare against defined shutdown thresholds.
2025-03-25 - 1.2.6 - fix(cli)
Refactor interactive setup to use dynamic import for readline and ensure proper cleanup
- Replaced synchronous require() with async import for ESM compatibility
- Wrapped interactive setup in try/finally to guarantee readline interface closure
- Enhanced error logging by outputting error.message
2025-03-25 - 1.2.5 - fix(error-handling)
Improve error handling in CLI, daemon, and systemd lifecycle management with enhanced logging for configuration issues
- Wrap daemon and service start commands in try-catch blocks to properly handle and log errors
- Throw explicit errors when configuration file is missing instead of silently defaulting
- Enhance log messages for service installation, startup, and status retrieval for clearer debugging
2025-03-25 - 1.2.4 - fix(cli/daemon)
Improve logging and user feedback in interactive setup and UPS monitoring
- Refactor configuration summary output in the interactive setup for clearer display
- Enhance logging in the daemon to show detailed SNMP settings and UPS status changes
- Improve error messages and user guidance during configuration and monitoring
2025-03-24 - 1.2.3 - fix(nupst)
No changes
2025-03-24 - 1.2.2 - fix(bin/nupst)
Improve symlink resolution in launcher script to correctly determine project root based on execution path.
- Replace directory determination with readlink for accurate symlink resolution
- Set project root to '/opt/nupst' when script is run via symlink from /usr/local/bin
- Add debugging comments to assist with path resolution
2025-03-24 - 1.2.1 - fix(bin)
Simplify Node.js binary detection in installation script
- Directly set Node binary path to vendor/node-linux-x64/bin/node
- Remove redundant architecture-specific detection logic
- Fallback to system Node if vendor binary is not found
2025-03-24 - 1.2.0 - feat(installer)
Improve Node.js binary detection and dynamic LTS version retrieval in setup scripts
- Enhanced bin/nupst to search multiple possible locations for the Node.js binary and fallback to system node if necessary
- Updated setup.sh to fetch the latest LTS Node.js version from nodejs.org and use a fallback version when the request fails
2025-03-24 - 1.1.2 - fix(setup.sh)
Improve error handling in setup.sh: exit immediately when the downloaded npm package lacks the dist_ts directory, removing the fallback build-from-source mechanism.
- Removed BUILD_FROM_SOURCE logic that attempted to build from source on missing dist_ts directory
- Updated error messages to clearly indicate failure in downloading a valid package
- Ensured installation halts if essential files are missing
2025-03-24 - 1.1.1 - fix(package.json)
Remove unused prepublishOnly script and update files field in package.json
- Removed prepublishOnly build trigger
- Updated files list to accurately include intended directories and files
2025-03-24 - 1.1.0 - feat(installer-setup)
Enhance installer and setup scripts for improved global installation and artifact management
- Detect piped installation in install.sh, clone repository automatically, and clean up previous installations
- Update readme.md with correct repository URL and clearer installation instructions
- Improve setup.sh to remove existing dist_ts, download build artifacts from the npm registry, and simplify dependency installation
2025-03-24 - 1.0.1 - fix(version)
Bump version to 1.0.1
- Updated commitinfo data to reflect the new patch version.
- Synchronized version information between commitinfo file and package metadata.
2025-03-24 - 1.0.1 - fix(build)
Update build script to use 'tsbuild tsfolders --allowimplicitany' and adjust distribution paths in .gitignore
- Replaced 'tsc' with 'tsbuild tsfolders --allowimplicitany' in package.json
- Updated .gitignore to reflect new compiled distribution folder pattern
- Updated changelog to document build improvements and regenerated type definitions
2025-03-24 - 1.0.1 - fix(build)
Update build script to use 'tsbuild tsfolders --allowimplicitany' and regenerate distribution type definitions for CLI, daemon, index, nupst, snmp, and systemd modules
- Replaced 'tsc' command with tsbuild in package.json
- Updated .gitignore to reflect new compiled distribution folder pattern
- Added new dist_ts files including .d.ts type definitions and compiled JavaScript for multiple modules
2025-03-24 - 1.0.1 - fix(build)
Update build script to use 'tsbuild tsfolders --allowimplicitany' and regenerate distribution type definitions for CLI, daemon, nupst, snmp, and systemd modules.
- Replaced the 'tsc' command with 'tsbuild tsfolders --allowimplicitany' in package.json.
- Added new dist_ts files including type definitions (d.ts) and compiled JavaScript for CLI, daemon, index, nupst, snmp, and systemd.
- Improved the generated CLI declarations and overall distribution build.
2025-03-23 - 1.0.0 - initial setup
This range covers the early commits that mainly established the repository structure.
- Initial repository commit with basic project initialization.