Commit Graph

3369 Commits

Author SHA1 Message Date
sanish chirayath
ff9a4d97e3 fix: newly created requests should be added within the directory context (#5784)
* fix: newly created requests should get added to directory we want them to get added

* refactor: simplify code

* fix : lint

* refactor

* refactor
v2.13.0
2025-10-14 17:49:21 +05:30
Bijin A B
6ab6e5ed57 fix(ui): limit dropdown width to 650px and fix alignment (#5781) 2025-10-14 12:05:48 +05:30
Bijin A B
3837a7612c Merge pull request #5778 from bijin-bruno/fix/environment-names-visibility
fix: make environment name width flexible up to 35% and disable tooltip for short names
2025-10-14 11:31:29 +05:30
Anoop M D
6589dc51cd Merge pull request #5765 from usebruno/chore/better-message-for-the-future-maintainer
chore(#1693): better comment explaining why bruno sets content-type header as false
2025-10-12 15:19:37 +05:30
Anoop M D
509f4da667 chore(#1693): better comment explaining why bruno sets content-type header as false 2025-10-12 15:18:29 +05:30
Anoop M D
9d2b070ed9 Merge pull request #5754 from Pragadesh-45/fix/doc-editor
feat(Markdown): override normalizing on whitespace in markdown editor
2025-10-11 17:25:39 +05:30
Anoop M D
d0c524cd9a Merge pull request #5757 from wbw1537/enhance-error-log
bugfix/Enhance error log for OAuth2 when certificate error
2025-10-11 17:08:43 +05:30
Anoop M D
74f0f67795 Update error message for SSL/TLS certificate verification 2025-10-11 17:08:09 +05:30
Bowen Wang
45664bdb65 enhance error log 2025-10-10 21:55:53 +08:00
Pragadesh-45
98cb2df3fe feat(Markdown): enhance Markdown rendering options and use exact whitespace instead normalizing 2025-10-09 23:33:55 +05:45
lohit
d478102b30 chore(bru-1943): upgrade electron version to v37.6.1 (#5752) 2025-10-09 18:58:28 +05:30
Siddharth Gelera (reaper)
924bc2e79e Merge pull request #5713 from barelyhuman/fix/form-values-seq-5237
fix: reimplement payload serialization for `x-www-form-encoded`
2025-10-09 18:25:28 +05:30
Pooja
c2d40fe99f Fix: Cross button not resetting timeout to inherit (#5749)
* Fix: Cross button not resetting timeout to inherit
2025-10-09 14:47:18 +05:30
sanish chirayath
944674d208 feat: add transformDescription function to handle various description formats in Postman collections (#5744)
- Implemented transformDescription to standardize handling of string and object descriptions.
- Updated importPostmanV2CollectionItem to utilize transformDescription for folder, request, and parameter descriptions.
- Added comprehensive tests for transformDescription covering edge cases and different formats.
2025-10-08 20:31:39 +05:30
Pooja
0c30357b01 feat: add redirect and timeout in request settings (#5672)
* feat: add redirect and timeout in request settings
2025-10-08 20:00:37 +05:30
Sanjai Kumar
ce40949564 fix: filter out internal content-type headers for no body requests in axiosinstance (#5591)
* fix: filter out internal content-type headers for no body requests in axios instance
2025-10-08 17:25:21 +05:30
Siddharth Gelera (reaper)
c6ce40c245 fix: keepAlive's fallback adds problem while saving normal requests (#5741)
* fix: only get the values if the settings exist
* Apply suggestion from @Copilot
* refactor: move status line to the query bar

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-08 17:06:24 +05:30
Anoop M D
6890bbee70 Merge pull request #5733 from Skewnart/fix/locale-usage-in-tests
fix: fixing tests using locale on numbers
2025-10-08 15:01:16 +05:30
lohit
4993c61e29 fix(bru-1928): fix debug library dependency for bruno-requests package (#5738) 2025-10-08 12:59:33 +05:30
anusree-bruno
a66e849cfb Feat/editor custom search (#5278)
* added custom search in editor

* UI improvements

* added yellow highlight for search

* added playwright tests

* memoizing matches and few other changes

* fixed issue with debounce

* refactoring and styling fixes

* lint fixes

* ensure ESC closes search bar even when focus is in editor

* move esc logic to editor

---------

Co-authored-by: Sid <siddharth@usebruno.com>
2025-10-08 11:05:17 +05:30
lohit
9f47200e7b fix(bru-1939): fix OAuth2 credentials not persisting across requests in the same collection run. (#5730) 2025-10-07 22:40:51 +05:30
lohit
10739c32c4 fix(bru-1928): bruno-cli oauth2 updates (#5729) 2025-10-07 22:38:52 +05:30
Siddharth Gelera (reaper)
c1853e613b Feat: Websocket Support (#5480)
* init

* fix: header saving in ws

* fix: retrieve auth value correctly

* feat: ws settings

* fix: text for inherited auth

* feat: pass down options/settings for ws

* fix: handle run handling on url

* fix: send initial message

* fix: fix header movement and minor cleanup

* fix: message queue

* refactor: faster flushing

* feat: ws tab specific additions

close tab should close connection
`ws` shown in the tab

* chore: remove unused icon

* feat: simplify query URL rendering

* fix: only add to settings if they were added

* chore: revert to original

* fix: restyle web ui

* feat: implement WebSocket response sorting and enhance message handling

- Added WSResponseSortOrder component for toggling message sort order.
- Updated WSMessagesList to accept and utilize sort order.
- Refactored message handling to use 'type' instead of 'direction'.
- Enhanced response state management to include sort order.

* feat: enhance WebSocket handling with redirect and upgrade events

- Added support for 'ws:redirect' and 'ws:upgrade' events in the WebSocket client.
- Updated WSResponseHeaders to format headers correctly.
- Modified WSResponsePane to display headers in the response.
- Improved message handling in the Redux slice for WebSocket events.

* fix: correct fallback for URL retrieval in bruRequestToJson

* feat: enhance WebSocket message handling and styling

- Add new styling for incoming messages in StyledWrapper.
- Update WSMessagesList to handle message sorting and focus.
- Refactor response sort order handling in WSResponseSortOrder.
- Improve WebSocket connection management in ws-client.

* fix: adjust styling for message display

* fix: imports for ws files

* fix: visually simplify the message list

* chore: pkg updates

* fix: remove unused content-type check in WebSocket request preparation

* fix: avoid duplicate messages

avoid message getting queued and sent twice

* feat: beautify the code editor in each message

* feat(websockets): add websocket tests

* tests(websockets): move it a folder up

* fix: hexdump on sent messages

* fix: make the view a lot more compact

* feat: enhance WebSocket message handling and styling

* formatting fixes - batch 1

* chore: formatting fixes batch 2

* chore: format changes batch 3

* chore: format settings batch 4

* chore: clean up

* chore: for now avoid oauth2

* chore: formatting changes batch 6

* test(websocket): add headers handling in tests

- Implemented logic to send headers in websocket messages.
- Added tests for websocket connections and message handling.
- Created locators for common elements in websocket tests.

* chore: cleanup

* test(websocket): refactor to use constant for BRU_FILE_NAME

Updated the test cases to utilize a constant for the BRU_FILE_NAME regex pattern for better maintainability and readability.

* test(websocket): update BRU_FILE_NAME to use regex

Changed BRU_FILE_NAME from a string to a regex pattern for better matching.

* fix(ws-client): rename timeout to handshakeTimeout

Updated the WebSocket connection options to use 'handshakeTimeout' instead of 'timeout' for clarity.

* chore: cleanup

* fix(ShareCollection): update non-exportable request types handling

Refactor hasGrpcRequests to hasNonExportableRequestTypes,
returning an object with a flag and types of requests that
will not be exported.

* feat: inherit timeout from app prefs

* fix: faster queue

* feat: add WSRequestBodyMode component and language detection

- Introduced a new component for selecting request body modes (JSON, XML, TEXT).
- Implemented auto-detection of language for the request body content.
- Created a styled wrapper for improved UI presentation.

* feat: enhance WebSocket message handling with decoder support

- Added decoder field to WebSocket messages in various components.
- Updated prettify functionality to handle XML and JSON formats.
- Modified Redux state to include decoder information.
- Adjusted schema validation to accommodate decoder field.

* refactor: replace decoder with type in WebSocket message handling

* fix: use `body` directly

* chore: reset formatting

* chore: reformat

* chore: reformat

* chore: reformat

* chore: reformat

* chore: base format

* chore: fix lang constructs

* chore: fix message queue flush logic

Ensure that the flushQueue method checks for the existence of the message queue before processing.

Refactor WebSocket test fixtures for better readability by correcting indentation and structure.

* fix: typo

* chore: lint fixes

* chore: lint fixes

* chore: rediff utils

* chore: rediff utils

* chore: remove from CLI

* chore: rediff utils

* chore: rediff utils

* chore: rediff utils

* chore: rediff utils

* chore: fix formatting

* tests(websocket): add websocket persistence tests

* chore: format

* feat(eslint): add TypeScript support and update test file patterns

* fix: turn off single line jsx expressions

* revert lang `ws` removal

* chore: reformat

* feat: better subprotocol support and tests

* chore: reformat

* chore: reformat

* clean up ununsed components

* refactor: locators, tests, new request design

* chore: close app for each test to start afresh

* Revert "chore: close app for each test to start afresh"

This reverts commit 5c2e3bec81.

* refactor: simplify dropdown mode selection

* chore: remove unused changes

* refactor: simplify

* chore: simplify

* fix: loading pulse animation

* refactor: update lodash import syntax

* fix: comments and sanitisation

* refactor: rename BRU_FILE_NAME to BRU_REQ_NAME for consistency

Updated variable names across websocket tests to improve clarity and maintain consistency in naming conventions.

* fix: null check for the initialisation of websocket client

* fix: add poller to check for saved state

* fix: variable message time check for tests

* fix: force wait for elements

* fix: use nth locators instead of wait (draft attempt)

* chore: reformat

* fix: update beta preferences to include websocket support

* feat: GA

* feat: rename `connectionTimeout` to `timeout` and better form

* feat: update WebSocket IPC channel names to use 'renderer' prefix

* feat: add 'oauth2' to supported authentication modes

* chore: add default `json` type in ws

* test: add tests for bruToJson and jsonToBru parsers

- Implemented smoke tests for the bruToJson parser to validate message inference and settings.

* refactor: improve timeout handling in WebSocket client

---------

Co-authored-by: Siddharth Gelera <siddharthgelera@Siddharths-MacBook-Air.local>
Co-authored-by: Sid <siddharth@usebruno.com>
2025-10-07 21:03:09 +05:30
Skewnart
c393dfe5d6 fix: fixing tests using locale on sizes 2025-10-07 16:33:20 +02:00
Pragadesh-45
cf17539a47 Refactor: Remove normalizeNewlines function and update tests to preserve newline types (#5697)
* refactor: remove `normalizeNewlines` function and update tests to preserve newline types
2025-10-07 18:43:19 +05:30
Anoop M D
608a9d1954 Merge pull request #5386 from pkolmann/bugfix-digest-auth
fix(digest-auth): fix Digest Auth when no QOP is set
2025-10-07 18:29:11 +05:30
Pragadesh-45
3a04d43ffe fix: lint 2025-10-07 18:05:46 +05:45
Pragadesh-45
5c9a391cc6 fix(digest-auth): handle multiple QOP values in Digest Auth 2025-10-07 17:39:38 +05:45
Pragadesh-45
df4b7c1337 feat(cli): ignore and skip invalid .bru file (#5711) 2025-10-07 15:20:45 +05:30
Pooja
db6a639c15 feat: add path based grouping for openapi (#5638)
* feat: add path based grouping for openapi
2025-10-07 13:32:11 +05:30
Siddharth Gelera (reaper)
85319769a5 feat: add Rosetta detection for Apple Silicon (#5717)
* feat: add Rosetta detection for Apple Silicon

* fix: update class attributes to className for React compatibility
2025-10-07 13:05:43 +05:30
Sanjai Kumar
8d2f087206 feat: enhance json environment file support in bruno-cli (#5660)
* feat: enhance json environment file support in bruno-cli

feat: add parseEnvironmentJson function to normalize environment JSON structure

lint fixes

feat: added tests for invalid JSON environment files in CLI and added missing constant defenition.

feat: improve JSON environment file handling and update tests

Trigger test

fix: update CLI command syntax for non-existent JSON environment file test

fix: correct CLI command syntax in test for non-existent JSON environment file

fix: update CLI command syntax in test for non-existent JSON environment file

fix: update test to use temporary path for non-existent JSON environment file

trying to fix the tests

fix tests

refactor: rename ERROR_INVALID_JSON to ERROR_INVALID_FILE and update related error handling in CLI commands and tests

fix: update parseEnvironmentJson to preserve secret flag

test: improved tests

* refactor: move parseEnvironmentJson function to utils/ environment.js file and update imports

* test: update tests
2025-10-07 12:49:22 +05:30
sanish chirayath
1cc3a6432a Feature: support import paths for gRPC (#5573)
* Enhance GrpcSettings component: update ui to improve user experience

Enhance GrpcSettings component: add import path management functionality

Refactor filesystem utility: remove duplicate isDirectory function and clean up code

Enhance GrpcQueryUrl component: add import path management and improve proto file selection functionality

Remove unused error message from GrpcQueryUrl component to streamline UI

Enhance GrpcSettings component: add editing functionality for proto files and import paths, improve UI for better user experience

Refactor GrpcSettings component: remove editing functionality for proto files and import paths, add replace import path feature, and update UI for improved feedback on file validity

Update GrpcQueryUrl component: change error message styling from red to yellow for improved visual feedback on invalid proto files and import paths

Refactor GrpcQueryUrl component: update styling for mode indicators and active tabs to use yellow color for improved visual consistency

Refactor ToggleSwitch component: add activeColor prop for customizable styling and update Checkbox background color logic to utilize activeColor

Update GrpcQueryUrl component: change dropdown and button styles to use yellow color for active states, enhancing visual consistency across the UI

Update GrpcSettings component: change error message styling from yellow to red for improved visibility and consistency in indicating invalid proto files and import paths

Refactor GrpcSettings component: remove hover background styles from table rows for a cleaner UI and maintain consistent button styling across actions

Refactor GrpcSettings component: remove Status column from the table and update error indication for invalid files with an alert icon for better visibility

Enhance Dropdown and GrpcQueryUrl components: add controlled visibility to Dropdown for improved interaction, and update loadGrpcMethodsFromProtoFile to accept collection for dynamic import paths, enhancing gRPC method loading functionality.

Refactor GrpcSettings component: streamline the display of proto files and import paths by consolidating empty state messages and enhancing error visibility with alert icons, while maintaining consistent table structure and button functionality.

Update GrpcQueryUrl component: simplify dependency array in useEffect and add conditional rendering for empty state messages regarding proto files and import paths, enhancing user feedback and clarity.

Refactor IconGrpc component: remove unused IconProto SVG definition to streamline the code and improve maintainability.

Refactor filesystem and network utility files: remove unnecessary blank lines to improve code readability and maintainability.

Update GrpcSettings and GrpcQueryUrl components: modify getBasename function to handle relative paths more effectively, and replace IconFile with IconFolder for improved visual consistency in the display of import paths.

Update Grpc components: enhance getBasename function to accept collection pathname for improved path resolution in GrpcSettings and GrpcQueryUrl, ensuring accurate display of proto file names.

Implement ProtobufSettings component: replace gRPC references with Protobuf, add functionality for managing proto files and import paths, and enhance UI with styled components for improved user experience.

Merge gRPC and Protobuf configurations for backward compatibility in CollectionSettings, ProtobufSettings, and GrpcQueryUrl components. Update state management and UI interactions to reflect the new structure, ensuring seamless transition from gRPC to Protobuf settings.

Add migration utility for gRPC to Protobuf configuration transition

Implement migration logic in collection-watcher to check and convert gRPC configurations to Protobuf format. Introduce a new utility for handling the migration process, ensuring backward compatibility and seamless updates to configuration files. This change enhances the application's ability to manage configuration transitions effectively.

Remove redundant migration logging and comments in collection-watcher.

Update loadGrpcMethodsFromProtoFile to use Protobuf configuration instead of gRPC. Adjust import path handling to reflect the new structure, ensuring compatibility with recent configuration transitions.

Enhance collection-watcher to send updated Protobuf configuration to the main process after migration. Remove redundant migration logic from the change function, streamlining the configuration handling process.

Add unit tests for gRPC to Protobuf migration utility

Introduce comprehensive tests for the migrateGrpcToProtobuf and needsMigration functions, covering various scenarios including config presence, merging, and handling of edge cases. This addition ensures the reliability of the migration process and validates the expected behavior of the utility functions.

Add initial tests for managing protofiles in Protobuf settings

Introduce a new test suite for managing protofiles, validating the visibility of protofiles and import paths in the Protobuf settings. The tests cover scenarios for loading methods from protofiles, handling invalid paths, and ensuring successful loading after providing necessary import paths. Additionally, a new collection configuration file is added to support the tests.

Reset gRPC methods state on loading errors in GrpcQueryUrl component. This ensures a clean state when encountering issues while loading methods from proto files, improving error handling and user feedback.

Enhance ProtobufSettings and GrpcQueryUrl components with data-test-ids for improved testing.

Refactor manage protofile tests to improve method loading verification. Update selectors for better specificity and ensure visibility of gRPC methods dropdown after selection.

Remove debug logging from getBasename function in path.js and refactor variable declaration in collection-watcher.js for improved clarity.

Refactor GrpcQueryUrl component to enhance dropdown item styling and improve method selection feedback. Update class names for better visual transitions and ensure consistent appearance across selected and hover states.

Refactor GrpcQueryUrl component by removing the GrpcurlModal implementation and its associated logic. This change streamlines the component and prepares for future enhancements.

Refactor GrpcQueryUrl component by introducing TabNavigation, ProtoFilesTab, and ImportPathsTab for improved organization and readability. This change enhances the user interface by streamlining tab management and separating concerns within the component.

Remove visibility check for loaded gRPC methods in manage protofile tests to streamline method selection process. Update selectors for improved specificity.

Refactor collection-watcher.js to remove gRPC migration logic and update configuration handling. Delete grpc-to-protobuf migration utility and associated tests to streamline codebase and eliminate redundancy.

Refactor GrpcQueryUrl component to rename gRPC-related functions and improve button click handling. Update dropdown item styling for consistency and enhance the visibility of proto files and import paths in the user interface. Add new test data for collection management and update paths in user data preferences.

Refactor path utility functions by removing getDirPath and updating exports in path.js. Adjust imports in Protobuf component to reflect these changes. Clean up filesystem.js by removing unused fs and fsPromises imports.

Refactor ProtobufSettings and GrpcQueryUrl components: improve code readability by standardizing arrow function syntax, enhancing UI feedback for proto files and import paths, and ensuring consistent styling across components.

Update manage protofile tests: change selector for collection path name to improve test specificity and ensure accurate visibility of protofiles in the Protobuf settings.

Refactor path utility functions and update component logic: modify getRelativePath and getBasename functions to accept parameters in a consistent order, enhancing path resolution across ProtobufSettings and GrpcQueryUrl components. Simplify filesystem utility functions by removing error handling for IPC calls, improving code clarity. Add comprehensive unit tests for path utilities to ensure reliability and correctness across different platforms.

fix: lint

feat: Add jsdocs to getAbsoluteFilePath utility function

refactor: Enhance GrpcQueryUrl and related components with styled wrappers for improved UI consistency

- Removed the "BETA" label from GrpcurlModal for a cleaner interface.
- Introduced StyledWrapper components for ImportPathsTab and ProtoFilesTab to encapsulate styling and improve readability.
- Updated TabNavigation to utilize StyledWrapper, enhancing the overall layout and design.
- Added new styles in the dark and light themes to support the updated UI elements, ensuring a cohesive look across components.

refactor: Enhance GrpcQueryUrl and related components with styled wrappers for improved UI consistency

- Removed the "BETA" label from GrpcurlModal for a cleaner interface.
- Introduced StyledWrapper components for ImportPathsTab and ProtoFilesTab to encapsulate styling and improve readability.
- Updated TabNavigation to utilize StyledWrapper, enhancing the overall layout and design.
- Added new styles in the dark and light themes to support the updated UI elements, ensuring a cohesive look across components.

refactor

feat: Enhance error handling and user feedback in GrpcQueryUrl and useProtoFileManagement

feat: Refactor GrpcQueryUrl component and introduce MethodDropdown and ProtoFileDropdown for improved user experience

- Removed unused imports and state variables to streamline the GrpcQueryUrl component.
- Introduced MethodDropdown for better organization of gRPC methods, enhancing selection and display.
- Added ProtoFileDropdown to manage proto file selection and import paths, improving user interaction.
- Updated UI elements for consistency and clarity, including dropdowns and method selection feedback.
- Enhanced error handling and user feedback mechanisms throughout the component.

refactor: rm comments

fix: linting

refactor: streamline proto file and import path management in useProtoFileManagement and useReflectionManagement hooks

refactor: use hook for protofile management within collection settings

fix: lint

fix: e2e tests

refactor: use getByTestId within playwright tests

refactor: enhance path utilities for cross-platform compatibility

* fix: lint

* test: add cleanup step to manage protofile tests for improved isolation
2025-10-07 12:47:16 +05:30
Pooja
28907a203f fix: Show active global environment in config modal (#5698)
* fix: Show active global environment in config modal
* add: delayShow prop in tooltip
2025-10-07 12:30:53 +05:30
Philipp Kolmann
6204e90e9c fix(digest-auth): fix Digest Auth when no QOP is set
(working on usebruno/bruno#5378)
2025-10-07 11:32:38 +05:45
sanish chirayath
1d0ba135ff Enable gRPC (Beta to GA) (#5687)
* refactor: remove gRPC feature toggle from CollectionSettings and Presets components

* fix: lint error

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>
2025-10-06 23:16:19 +05:30
Siddharth Gelera (reaper)
3c72975314 fix: removeMenu on about window (#5712) 2025-10-06 15:30:14 +05:30
Andrii Oriekhov
3fa9fea6a4 use request directory as the destination for saving response (#5699)
* use request directory as the destination for saving response
* use request directory as the destination for saving response
2025-10-04 02:33:28 +05:30
Anoop M D
239f1dc9f5 Merge pull request #5690 from james-ha-bruno/feat/add-get-tags-for-requests
adding req getTags methods
2025-10-04 02:04:11 +05:30
James Ha
28e37d8f6f feat(#5689): req.getTags() api 2025-10-04 01:45:33 +05:30
Anoop M D
8b28070695 Merge pull request #5666 from usebruno/feat/tab-reordering-internal
feat: extended additions for tab reordering (#5413)
2025-10-02 08:44:28 +05:30
Bijin A B
4ae55b8f1a fix: update interpolate-request-url.spec.ts test flow (#5682) 2025-10-01 13:45:51 +05:30
Sanjai Kumar
8bad0262c6 feat: Enhance EnvironmentVariables component with read-only support for non-string values (#5616)
* feat: Enhance EnvironmentVariables component with read-only support for non-string values

* feat: minor refactor and cleanup worker app state

* fix: playwright test flow

---------

Co-authored-by: Bijin Bruno <bijin@usebruno.com>
2025-10-01 02:36:45 +05:30
Sanjai Kumar
c7029d1cda fix: improve file upload handling in prepare-request to use streaming (#5637)
* fix: improve file upload handling in prepare-request to use streaming
* feat: add unit tests

---------

Co-authored-by: Bijin Bruno <bijin@usebruno.com>
2025-09-30 22:47:09 +05:30
Sid
bb44d9e193 feat: add draggable tabs component (#5669) 2025-09-30 14:27:25 +05:30
Jayakrishnan C N
14966f6e6c feat: import multiple collections from a parent folder (#5431)
* feat: import multiple collections from a parent folder
* feat: open collections in parallel, revert plural labels, and update playwright tests

---------

Co-authored-by: Bijin Bruno <bijin@usebruno.com>
2025-09-30 13:27:20 +05:30
Siddharth Gelera (reaper)
56f0741121 chore: extract ts support for aslant from feat/websocket-engine (#5664)
* chore: extract ts support
2025-09-30 11:23:47 +05:30
Roland Schaer
b1840d189d feat: make tabs reorderable (#5413) 2025-09-30 08:59:25 +05:30
naman-bruno
aacb1e0b8e Merge pull request #5635 from naman-bruno/feat/performance-monitor
add: system monitor
2025-09-29 19:37:56 +05:30
Anoop M D
fa0f3b3b7b Merge pull request #5661 from barelyhuman/fix/eslint-comma-arrow
fix: update stylistic rules in ESLint configuration
2025-09-29 15:46:27 +05:30