Commit Graph

69 Commits

Author SHA1 Message Date
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
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
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
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
Pragadesh-45
db35e7059c Merge pull request #5438 from Pragadesh-45/feat/multiline-values-for-env-vars
Feat/ Add Multiline Support for Enviroment Variables
2025-09-06 17:17:51 +05:30
Sanjai Kumar
648581ded5 feat: custom HTTP method (#4841) 2025-09-02 23:09:48 +05:30
Anoop M D
b8d67d9232 Merge branch 'main' into bugfix/571 2025-08-30 01:52:46 +05:30
Anoop M D
bcf4673a64 chore: Update Bruno grammar and tests to support keys with spaces, braces, and nested escaped quotes in headers and query parameters 2025-08-30 01:44:33 +05:30
lohit-bruno
311a232968 updates 2025-08-20 16:57:07 +05:30
lohit-bruno
cd00c21781 dsl updates 2025-08-20 16:30:08 +05:30
lohit-bruno
ceab0b4dc1 additional params updates 2025-08-13 21:42:04 +05:30
lohit
63f5108dfd list block grammar fixes (#5180) 2025-07-25 14:07:38 +05:30
lohit-bruno
0e28c97f8f collection runner tag updates 2025-07-15 14:33:18 +05:30
Antti Sonkeri
3803576aa4 feat: Tagging requests and filtering collection runs using tags 2025-07-15 13:37:36 +05:30
Pooja
e4ae857df3 Merge pull request #4693 from pooja-bruno/mv/isValidValue-in-common-file
Fixed a bug causing secrets to appear as null instead of an empty value.

rm isValidValue and directly handle it in encryptString and `decryptString` function
2025-06-09 13:50:25 +05:30
lohxt1
5a98da2031 oauth2 fixes 2025-03-20 19:27:14 +05:30
lohxt1
5728b7c8a8 fix bruno-lang unit tests 2025-03-16 14:24:04 +05:30
Sanjai Kumar
af182a9c00 refactor: rename binaryFile to file and update related references 2025-02-04 22:12:59 +05:30
Sanjai Kumar
dd23962958 improvements (#3930)
Co-authored-by: Sanjai Kumar <sanjai@usebruno.com>
2025-02-04 22:12:59 +05:30
Marcos Adriano
324b7cec51 feat: raw binary files handling in request body (#3734)
--------------
Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
2025-02-04 22:12:59 +05:30
Mateusz Pietryga
8c6ce2e084 fix: Allow quoting some special characters in names of multipart request body parts and headers in bru files
Fixes #571
2025-01-20 23:18:36 +01:00
Mateusz Pietryga
b02f6b61ee fix: Adjust Bruno grammar to allow quoting some special characters in names query parameters
Automatically quote query parameter keys if they contain characters sensitive for bru syntax: ':', '"', '{', '}' or ' '.
Quoted keys stored in .bru files now support escaping, so it is possible to store keys that themselves contain '"' character.

Fixes #3037
Fixes #2810
Fixes #2878
2025-01-20 23:10:50 +01:00
lohit
73ea5f155d Merge branch 'main' into feature/1602-multipart-content-type 2024-12-15 18:08:05 +05:30
Sanjai Kumar
4d820af4e0 Improved Feat/wsse auth (#3172)
* adding wsse auth logic

* adding wsse auth logic to electron

* adding wsse auth formatting

* Refactoring WSSE 'secret' to 'password'

* Incorporating PR feedback

* Removed unused packages from package.json

* Fixed issue caused when resolving merge conflicts and added new route to test wsse

* Removed deprecated package usages from bruno-cli

* Fixed tests

---------

Co-authored-by: dwolter-emarsys <dylan.wolter@emarsys.com>
2024-09-23 17:46:31 +05:30
busy-panda
a703b84681 Merge branch 'main' into feature/1602-multipart-content-type
# Conflicts:
#	packages/bruno-lang/v2/src/bruToJson.js
#	packages/bruno-lang/v2/src/jsonToBru.js
2024-07-01 15:17:53 +02:00
lohit
bcdbc0ebed fix tests for bruno-electron & bruno-lang (#2410) 2024-06-04 14:17:36 +05:30
Dhananjay Kadam
32b1ba1c92 feat: add support for state param for OAuth2 Authorization Code flow (#2330)
* feat: add support for state param

* chore: revert package-lock.json

* test: update tests with state param

* chore: revert package-lock.json

* chore: add state to missing places

* Adding state to PKCE toggle

---------

Co-authored-by: Kadam Dhananjay <kadamdhananjay@johndeere.com>
2024-05-31 15:35:27 +05:30
busy-panda
39f60daca7 feature: Multi-part requests: user should be able to set content-type for each part in a multi-part request. #1602 2024-04-18 15:43:09 +02:00
Anoop M D
c00bfb0ce4 fix: fixed failing tests 2024-03-12 23:47:08 +05:30
lohit
858536e13d feat(#1003): collection level oauth2, access_token_url & scope for 'Client Credentials' and 'Password Credentials' grant types (#1691)
* feat(#1003): authorization_code grant type PKCE support, code cleanup..
---------

Co-authored-by: lohit-1 <lohit@usebruno.com>
2024-03-04 15:21:05 +05:30
Anoop M D
b375620875 chore: fix tests 2024-02-27 01:39:34 +05:30
lohit
9f81e6dc73 feat(#1003): oauth2 support - resourceOwnerPasswordCredentials, authorization code, client credentials (#1654)
* feat(#1003): oauth2 support
Co-authored-by: lohit-1 <lohit@usebruno.com>
2024-02-26 16:44:38 +05:30
Anoop M D
7c6a043188 chore: fixed bru-lang tests 2024-02-06 03:04:59 +05:30
Anoop M D
64923e47a2 Merge pull request #817 from drinkbird/feature/digestauth
Add Digest Auth Support #119
2023-11-03 20:26:24 +05:30
Tasos Piotopoulos
3838848b03 Add Digest Auth Support (MD5) 2023-10-29 02:36:34 +00:00
Its-treason
d52163ceb3 test: Fix failing test 'should parse the json file' 2023-10-25 23:30:31 +02:00
Brian Rodgers
f781bd7d8a Merge remote-tracking branch 'upstream/main' 2023-10-11 15:54:56 -07:00
Stefan Ollinger
41abdbb7fa Support SPARQL bodies 2023-10-10 20:47:02 +02:00
Anoop M D
3d366477d0 feat(#309): use dotenv for .env file parsing 2023-10-10 04:22:21 +05:30
Anoop M D
856236c918 feat(#334): Bru lang updates for collection.bru file 2023-10-08 01:57:30 +05:30
Brian Rodgers
e2e3895a58 Added support for AWS Sig V4 Authentication 2023-10-06 08:47:05 -05:00
Anoop M D
48e4e60696 feat(#119): bearer auth support completed 2023-10-04 00:36:52 +05:30
Anoop M D
51ee37cf96 feat(#119): bru lang support for basic and bearer auth 2023-09-29 01:35:22 +05:30
Anoop M D
2f45b95930 feat(#199): bru lang updates to store environment secrets 2023-09-22 01:08:35 +05:30
Anoop M D
116e050987 chore(#197): ran prettier on packages/bruno-lang 2023-09-22 00:42:48 +05:30
Anoop M D
1c4c5cc0c0 feat(#122): Support parsing of dotenv files 2023-09-22 00:27:27 +05:30
Anoop M D
d58e92205b feat: assertions implementation in UI 2023-02-21 14:04:05 +05:30
Anoop M D
013abeaa80 fix: fixed parser issue related to env variables #97 2023-02-17 12:56:48 +05:30
Anoop M D
242fcac2d3 feat: bru lang now allows empty urls 2023-02-09 17:31:37 +05:30
Anoop M D
aff6499478 feat: assert tab allows any valid js code as keys 2023-02-08 18:17:30 +05:30