Skip to content

Enhance CLI output options and logging behavior #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EhsanMarufi
Copy link

@EhsanMarufi EhsanMarufi commented May 19, 2025

Description

This PR introduces important enhancements to the func-js CLI output options and logging:

  • Added support for the --boc-hex, --boc-base64, and --fift options to output compiled data either to a specified file or directly to the console by passing an empty string ("").
  • Updated CLI help text to clearly document these flexible output modes and the new --verbose flag.
  • Logging respects the --verbose flag, suppressing verbose messages by default and enabling detailed output only when requested.
  • Improved clarity and professionalism of all log, error, and warning messages.

Console logging of BoC hex, BoC base64, and Fift code is especially valuable for scripting, quick debugging, and verification workflows. Providing output both as console logs and file writes gives users flexible access to these common formats, facilitating faster development and easier troubleshooting.

These improvements are backward-compatible and focus on enhancing usability and developer experience without breaking existing workflows.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • New and existing unit tests pass locally with my changes

- Added support for `--boc-hex` to output the compiled BoC directly to the console for easier accessibility
- Improved usage help message with clearer layout and descriptions
- `--boc-hex`, `--boc-base64`, and `--fift` now accept empty string ("") to output to the console
- Refined log, warning, and error messages for better clarity
- Introduced `--verbose` flag to enable additional output; verbose logs are now suppressed by default
- Ensured output-related behavior is consistent and user-friendly across CLI usage

These changes significantly enhance the developer experience, especially for scripting and debugging.
@EhsanMarufi EhsanMarufi force-pushed the feature/cli-output-logging-enhancements branch from 131db3b to dac5dca Compare May 19, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant