* Add proxy .pac file resolver
chore(dependencies): update package-lock.json with new dependencies and version upgrades
- Added new dependencies: ajv, git-url-parse, @opencollection/types, and storybook packages.
- Updated existing dependencies to their latest versions, including eslint and babel packages.
- Removed deprecated entries and cleaned up the package-lock structure for better maintainability.
* tests
* wip
* wip
* wip
* wip
* feat: file upload .pac
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* feat: Refactor proxy settings to use a new structure for PAC configuration. Introduced 'source' field to determine proxy type (manual or PAC) and updated related validation and state management. Removed deprecated 'pacUrl' field in favor of 'pac.source'. Updated preferences schema and test data accordingly.
* fix: Update proxy settings to correctly reference 'source' field for PAC configuration. Adjusted state management and validation logic to align with new structure. Enhanced tests for backward compatibility and new format handling.
* feat: Enhance proxy configuration by adding 'proxyModeReason' to provide context for proxy settings. Updated related functions to accommodate the new parameter and improved logging for proxy mode changes.
* wip
* refactor: Update proxy settings to remove 'inherit' field and replace it with 'source' for better clarity. Adjusted validation schema, default preferences, and migration logic to align with the new structure. Enhanced tests to ensure compatibility with the updated proxy configuration.
* wip
* wip
* wip
* wip
* wip
* chore: consistent path check
* chore: consistency
* tests(pac): fix unit params
---------
Co-authored-by: Gianluca D'Abrosca <gianluca.dabrosca.1999@gmail.com>
Co-authored-by: Sid <siddharth@usebruno.com>
* fix: preserve user-defined boundary in multipart/mixed Content-Type header
When users specify a boundary parameter in their Content-Type header for
multipart/mixed requests with TEXT body mode, Bruno now preserves the
user-defined boundary instead of generating a new one.
Fixes: https://github.com/usebruno/bruno/issues/7523
* updated the test to use local server and changed the request method to GET
* fix: handle quoted boundary values in Content-Type header extraction
---------
Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>
* fix: quote values containing hash (#) in .env file serialization
Values containing # characters were being truncated when saved to .env
files because the dotenv parser interprets # as a comment character.
This fix adds a shared jsonToDotenv utility in bruno-common that properly
quotes values containing special characters (#, \n, ", ', \) to ensure
they are preserved through serialization and parsing.
- Add jsonToDotenv utility with comprehensive test coverage
- Update bruno-electron and bruno-app to use shared utility
- Remove duplicate serialization logic from multiple locations
Fixes https://github.com/usebruno/bruno/issues/7375
Fixes https://github.com/usebruno/bruno/issues/7327
* fix: escape carriage returns in .env file serialization for Windows CRLF handling
---------
Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>
* feat(snippet-generator): implement encodeUrl setting to control URL encoding in generated snippets
* refactor(snippet-generator): rename and enhance URL encoding logic for better clarity and functionality
* feat(snippet-generator): enhance raw URL handling to preserve user encoding choices and improve snippet generation
* test(snippet-generator): add tests for URL fragment handling based on encodeUrl setting
* test(snippet-generator): improve comments on URL fragment handling to clarify RFC compliance
* feat(url): enhance interpolateUrlPathParams to support raw URL handling, preserving user encoding choices for snippet generation
* fix(url): ensure URLs are prefixed with http:// if missing in interpolateUrlPathParams function
* refactor(snippet-generator): streamline URL handling logic to improve snippet generation and ensure proper encoding based on settings
* feat(url): add stripOrigin utility to simplify URL processing in snippet generation
* test(snippet-generator): add test for double-encoding of pre-encoded URLs when encodeUrl is true
* feat(encoding): implement URL encoding settings and add tests for encoding behavior
* fix: address PR review comments (#7187)
- Remove unnecessary no-op jest.mock for @usebruno/common/utils
- Add length guard to prevent catastrophic replaceAll('/') on root-path URLs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* empty commit
* fix(tests): update interpolateUrlPathParams tests to use correct parameter structure
* empty commit
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: storing status in example for yml file
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: temporary check for tests
* fix: test cases for status and statusText
* chore: removed logs
* fix: test cases for response status and text
* fix: test cases for response status and text
* fix: resolved comments
* fix: openapi test import test cases
* chore: removed console logs
* fix: status type in response example while import/export of collection
* fix: postman to bruno import
---------
Co-authored-by: shubh-bruno <shubh-bruno@shubh-bruno.local>
* feat: interface zoom control settings
* fix: allow zoom controls using shortcuts
* fix: maintain consitency in zoom shortcuts and ui interface
* fix: added min max to 50% and 150% for zoom
* fix: moved percentageToZoomLevel function in bruno-common
* chore: abstractions
---------
Co-authored-by: shubh-bruno <shubh-bruno@shubh-bruno.local>
* Mark test script errors as failed in runner (#6261)
* Mark test script errors as failed in runner
and CLI
* Unify handling of post-response and pre-request script errors in both CLI and Electron
* feat: Enhance error handling in script execution by preserving partial results for pre-request and post-response scripts across CLI and Electron. This ensures that tests passing before an error are still reported.
* Preserving stopExecution in test script error handler
---------
Co-authored-by: Pragadesh-45 <temporaryg7904@gmail.com>
* Enhance error handling for script execution by introducing isScriptError flag in test results (#7029)
* fix: Enhance error handling for script execution by introducing isScriptError flag in test results
Enhance error reporting in script execution by adding isScriptError flag to error responses
fix: Mark pre-request script errors as failures in runner summary
---------
Co-authored-by: Karan Pradhan <78605930+KaranPradhan266@users.noreply.github.com>
Co-authored-by: Pragadesh-45 <temporaryg7904@gmail.com>
* fix: Enhance error handling for script execution by introducing isScriptError flag in test results
Enhance error reporting in script execution by adding isScriptError flag to error responses
fix: Mark pre-request script errors as failures in runner summary
* feat: add support for skipped files in run command and update HTML report template
* refactor: enhance skipped file handling in run command
* fix: improve error display in HTML report for skipped requests
* test: add unit test for HTML report generation of skipped requests with parsing errors
* test: update HTML report generation tests to check for skipped request summaries
* refactor: extract skipped result creation logic into a separate utility function
* refactor: enhance skipped result processing in run command to include additional metadata
* refactor: rename and enhance createSkippedResults function for improved skipped file processing
* refactor: remove unused stripExtension import from run command
* refactor: rename createSkippedResults to createSkippedFileResults for clarity and consistency
* feat: add patternHasher utility for variable hashing
This utility function hashes input strings containing variables and allows for restoration of the original string. It includes support for custom matchers and handles cases where no variables are matched.
* Update packages/bruno-common/src/utils/template-hasher.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Sid <siddharth@usebruno.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Previously, `{{$randomInt}}` returned values across the full JavaScript number range.
This commit updates the generator to produce integers between 0 and 1000,
matching the documented behavior.
Fixes#4847
* move interpolateMockVars function inside the main interpolate logic inside bruno-common.
* improve comments for JSON escaping logic in interpolate function
* update faker-functions to use CommonJS module syntax to satisfy jest and add regex validation tests
---------
Co-authored-by: sanjai0py <sanjailucifer666@gmail.com>
Co-authored-by: ramki-bruno <ramki@usebruno.com>