mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-15 11:51:30 +00:00
* feat: add options to skip request and response bodies in reporter output - Introduced `--reporter-skip-request-body` and `--reporter-skip-response-body` flags to omit respective bodies from the reporter output. - Updated examples in the CLI documentation to reflect new options. - Refactored result sanitization to handle new flags. * feat: add shorthand option to skip both request and response bodies in reporter output - Introduced `--reporter-skip-body` as a shorthand for omitting both request and response bodies from the reporter output. - Updated CLI documentation examples to include the new shorthand option. - Adjusted result sanitization to accommodate the new option. * refactor: simplify documentation and tests for reporter-skip-body option - Updated the description of the `--reporter-skip-body` option to remove redundancy. - Removed outdated shorthand references from the test suite for clarity. - Cleaned up examples in the CLI documentation to focus on the current functionality. * fix: handle optional chaining for request and response properties in result sanitization - Updated the `sanitizeResultsForReporter` function to use optional chaining when accessing request and response headers and data. - This change prevents potential errors when these properties are undefined. * test: enhance reporter-skip-body tests for JSON and HTML outputs - Added comprehensive tests for the `--reporter-skip-request-body` and `--reporter-skip-response-body` options in both JSON and HTML report formats. - Verified that the appropriate request and response bodies are included or excluded based on the specified flags. - Improved test coverage for scenarios where both flags are used simultaneously. * fix: remove optional chaining for request and response headers in result sanitization - Updated the `sanitizeResultsForReporter` function to directly assign empty objects to request and response headers, ensuring consistent behavior regardless of their initial state. - This change simplifies the code and maintains functionality for skipping headers.