Commit Graph

3232 Commits

Author SHA1 Message Date
sanish-bruno
63e5fbab36 refactor: remove unnecessary parameters and comments in QuickJS VM execution 2026-01-29 14:19:37 +05:30
sanish-bruno
5e03846da6 refactor: simplify QuickJS VM execution by removing unnecessary cleanup logic 2026-01-28 19:41:35 +05:30
sanish-bruno
2a585b0e62 refactor: remove statistics tracking from HookManager and HooksRuntime 2026-01-28 19:13:59 +05:30
sanish-bruno
68bd6d5303 refactor: remove outdated comments and clean up hook execution documentation 2026-01-28 19:13:59 +05:30
sanish-bruno
60593575e3 refactor: remove unused imports and enhance collection-level hook updates
- Eliminated unused imports from collection.js to clean up the codebase.
- Added functionality to send UI updates after executing collection-level hooks in network/index.js, improving responsiveness and user experience.
2026-01-28 19:13:59 +05:30
sanish-bruno
5851693529 refactor: streamline hook execution by merging scripts and removing unused functions
- Consolidated hook management by merging hooks from collection, folders, and requests into a single script using mergeScripts.
- Removed the HooksExecutor and HooksConsolidator, simplifying the execution flow.
- Updated runSingleRequest and network IPC to utilize the new merged hooks approach for improved performance and clarity.
- Enhanced comments for better understanding of the hook execution process.
2026-01-28 19:13:58 +05:30
sanish-bruno
57351b74ec refactor: centralize BrunoRequest and BrunoResponse creation in HooksRuntime 2026-01-28 19:13:58 +05:30
sanish-bruno
10408a344a feat: enhance hook control flow and response handling 2026-01-28 19:13:58 +05:30
sanish-bruno
9b40dd4551 feat: add sendScriptEnvironmentUpdates function for improved UI updates 2026-01-28 19:13:58 +05:30
sanish-bruno
b82f068c8c refactor: remove unused hook execution function and clean up code
- Eliminated the executeHooksForLevel function from run-single-request.js and network/index.js to streamline hook management.
- Updated comments for clarity and consistency in the remaining hook execution functions.
2026-01-28 19:13:58 +05:30
sanish-bruno
ef2498a898 rm: ununsed fn 2026-01-28 19:13:57 +05:30
sanish-bruno
3d319855bc feat: enhance hook functionality with runSingleRequestByPathname
- Introduced runSingleRequestByPathname to allow running requests at the collection level.
- Updated executeCollectionHooks to utilize the new function for improved hook execution.
- Added comprehensive tests for bru.runRequest in various hook scenarios, ensuring correct behavior and response handling.
- Removed redundant code and optimized hook management in collection.js.
2026-01-28 19:13:57 +05:30
sanish-bruno
2c474e8052 feat: introduce HooksExecutor and HooksConsolidator for optimized hook execution
- Added HooksExecutor to centralize hook execution logic across CLI and Electron.
- Implemented HooksConsolidator to improve performance by consolidating multiple hook levels into a single execution context.
- Refactored existing hook management to utilize the new executor and consolidator, enhancing efficiency and reducing resource usage.
- Updated runSingleRequest and network IPC to leverage consolidated hook execution for better performance.
- Introduced comprehensive tests for the new hooks functionality, ensuring reliability and correctness.
2026-01-28 19:13:57 +05:30
sanish-bruno
cc33299702 refactor: streamline hook management by removing unnecessary HookManager instances and optimizing hook execution flow 2026-01-28 19:13:57 +05:30
sanish-bruno
777707180e fix: pass runtime context to Bru instance in hooks runtime 2026-01-28 19:13:57 +05:30
sanish-bruno
34fcc5bbfb fix: init send event at the right time 2026-01-28 19:13:57 +05:30
sanish-bruno
de43ad00d8 rm: duplicate 2026-01-28 19:13:57 +05:30
sanish-bruno
60d5d5e98d fix: optimize quick js runtime 2026-01-28 19:13:57 +05:30
sanish-bruno
f6e2279fe3 feat: hooks runtime
add: hooks component

add support for hooks within bruno-lang

fix: hooks is not getting save

hooks implemtation

add hooks component within folders, requests

add: quick js shims for hooks

fix: garbage collected hook managers

send logs to main

rm: hook manager store

feat: introduce HOOK_EVENTS constant for improved hook management

add folder start/end events

add folder run events

rm: folder run related events

add cli support for hooks

support script:hooks instead of hooks

move hooks to script tab

make outer scope available within callback in safemode

added runner, req apis as an abstraction over event based hooks

fix: crash while editing folder hooks

rm: unused files

fix: self review changes

refactor, request specific hook manager deleted once

add: cm

rm: spaces

add prompt var

rm: indent

fix: lint

refactor: shims handling for hooks

fix: enable async calling in dev mode for gui, cli

fix: support async callbacks within safe mode

rm: vm instance

fix: review comments

fix: review comments

add cli tests for hooks

rm: client certs

fix: add hooks to oc yaml

fix: rename uid ot path name for better clarity, app crash when saving folder hooks

rm: console

rm: vm2 runtime leftover

rm: check

add: handler cleanup function

add: playwright test case for hooks

rm: review fixes

fix: review comments

add fallback hook manager

add fallback hook manager

fix: show error from hooks scripts within response pane

change: collection events name

feat: add name spaced hooks

fix: review comments

add: hooks specific collection for testing

use hooks manager as a private field

fix: tests

use collection from bruno-test within playwright

rm: databuffer test

fix: playwright test

rm: unintended changes

rm: file
2026-01-28 19:13:57 +05:30
sanish-bruno
80b4ab0561 fix: disable run collection icon once triggered to avoid multiple collection runs 2026-01-28 19:13:57 +05:30
sanish-bruno
4bb01ca0ac feat: hooks runtime
add: hooks component

add support for hooks within bruno-lang

fix: hooks is not getting save

hooks implemtation

add hooks component within folders, requests

add: quick js shims for hooks

fix: garbage collected hook managers

send logs to main

rm: hook manager store

feat: introduce HOOK_EVENTS constant for improved hook management

add folder start/end events

add folder run events

rm: folder run related events

add cli support for hooks

support script:hooks instead of hooks

move hooks to script tab

make outer scope available within callback in safemode

added runner, req apis as an abstraction over event based hooks

fix: crash while editing folder hooks

rm: unused files

fix: self review changes

refactor, request specific hook manager deleted once

add: cm

rm: spaces

add prompt var

rm: indent

fix: lint

refactor: shims handling for hooks

fix: enable async calling in dev mode for gui, cli

fix: support async callbacks within safe mode

rm: vm instance

fix: review comments

fix: review comments

add cli tests for hooks

rm: client certs

fix: add hooks to oc yaml

fix: rename uid ot path name for better clarity, app crash when saving folder hooks

rm: console

rm: vm2 runtime leftover

rm: check

add: handler cleanup function

add: playwright test case for hooks

rm: review fixes

fix: review comments

add fallback hook manager

add fallback hook manager

fix: show error from hooks scripts within response pane

change: collection events name

feat: add name spaced hooks

fix: review comments

add: hooks specific collection for testing

use hooks manager as a private field

fix: tests

use collection from bruno-test within playwright

rm: databuffer test

fix: playwright test

rm: unintended changes

rm: file
2026-01-28 19:13:57 +05:30
sanish chirayath
5044241d17 feat: enhance translation for request and response URLs (#6956) 2026-01-28 18:59:14 +05:30
sanish chirayath
584344ac47 Fix: duplicate toast when saving an example (#6952)
* chore: update saveRequest calls from example to include silent parameter

- Modified multiple components to pass an additional `true` parameter to the `saveRequest` function, ensuring requests are saved silently when it comes to examples.
- Added AGENTS.md to .gitignore to exclude it from version control.

* feat: add success notifications for cloning, renaming and deleting examples

* refactor: update saveRequest calls to handle success notifications for renaming and deleting examples

* refactor: remove unused toast import from DeleteResponseExampleModal
2026-01-28 17:59:03 +05:30
Pooja
d975d0b642 fix: openapi spec with example values (#6476)
* fix: openapi spec with example values

* fix

* fix
2026-01-28 16:03:00 +05:30
shubh-bruno
af6908e9c0 fix: disable editing runtime variable if same as collection (#6835)
Co-authored-by: shubh-bruno <shubh-bruno@shubh-brunos-MacBook-Air.local>
2026-01-27 22:08:41 +05:30
Pooja
21673f46de feat: add header validation (#6859)
* feat: add header validation

* fix: test stability

* fix: scope the locator

---------

Co-authored-by: Sid <siddharth@usebruno.com>
2026-01-27 22:06:17 +05:30
naman-bruno
7661af34c8 consistent string handling across parsers (#6866)
* consistent string handling across parsers

* fix
2026-01-27 14:10:40 +05:30
Abhishek S Lal
9e1c58ab6f Remove isLikelyText detection from buffer content type utility (#6870) 2026-01-22 12:40:57 +05:30
sanish chirayath
5fd3948028 Feature: send request translation (#6792)
* feat: implement translation utilities for converting Bruno scripts to Postman format

- Added `bru-to-pm-translator` for translating Bruno API calls to Postman equivalents.
- Introduced `pm-to-bru-translator` for reverse translations from Postman to Bruno.
- Created utility functions in `ast-utils` for efficient AST manipulations.
- Enhanced `bruno-to-postman.js` to utilize the new translation functions for script handling.
- Updated tests to cover various translation scenarios, ensuring accuracy and reliability.

* empry commint

* refactor: migrate utility functions to ES module syntax

- Converted utility functions in `ast-utils.js` to named exports for better modularity.
- Updated import statements in `bru-to-pm-translator.js` and `pm-to-bru-translator.js` to use ES module syntax.
- Refactored test files to align with the new import structure, enhancing consistency across the codebase.

* fix: translations

* fix: add info regarding cookie apis

* simplify translations removing legacy inverse translation

* fix: add translation for getFolderVAr

* refactor: simplify transformation functions by removing change tracker

* fix: renamed files and folders

* fix: import statements

* rm : file

* simplify getSize translation

* rebase

* fix: rebase

* fix: update transformCallback to support async functions

* feat: enhance object transformation to support spread operators in request data

* refactor: transform body function

* feat: added request transformation testcases, refactor
2026-01-21 20:26:13 +05:30
lohit
3e92c44a5a Merge pull request #6748 from lohit-bruno/bruno_app_instances_handling
feat: `bruno app instances` handling updates
2026-01-21 19:53:17 +05:30
Pragadesh-45
67c1d39e60 feat: preferences as tab (#6786)
* feat: preferences as tab

refactor: remove preferences tab from permanent tabs and update tab label handling

fix: comment

Co-authored-by: Sid <siddharth@usebruno.com>

* refactor: replace Checkbox component with native input elements in Preferences and ProxySettings

---------

Co-authored-by: Sid <siddharth@usebruno.com>
2026-01-21 19:22:28 +05:30
Pragadesh-45
2288121f70 feat: status indicator for pre and post request scripts (#6865) 2026-01-21 19:01:06 +05:30
Pooja
a22eb43a27 fix(websocket): add API Key query params support and OAuth2 inheritan… (#6271)
* fix(websocket): add API Key query params support and OAuth2 inheritance warning

* add: playwright test
2026-01-21 18:56:46 +05:30
Sid
27b7fa81f2 feat: js api supports get path params (#5235) (#6762) 2026-01-21 18:41:47 +05:30
Bijin A B
1f571267b0 Merge pull request #6814 from sanjaikumar-bruno/fix/basic-auth-codegen
fix: Code Generation for Basic Auth
2026-01-21 18:38:46 +05:30
Sanjai Kumar
0b79ce9095 fix: correct action type string for global environments in autosave middleware (#6872) 2026-01-21 18:33:09 +05:30
Pooja
75e17610f0 fix: openapi query param import (#6241) 2026-01-21 17:53:14 +05:30
sanjai
acf576872c enhance: snippet generator to support header interpolation
refactor: improve snippet generation and update test cases

updated to minimise changes

fix: remove exclusive test flag

refactor: enhance interpolation utilities

refactor: expand interpolation utilities for auth, headers, body, and params

refactor: simplify request handling in snippet generation by removing lodash dependency and clarifying auth header processing

fix: tests

refactor: integrate interpolateObject utility for enhanced interpolation across auth, headers, body, and params

refactor: streamline body interpolation by removing lodash dependency and returning updated body structure

refactor: enhance body interpolation logic and streamline auth header processing in snippet generation

refactor: simplify getAuthHeaders function by removing unnecessary parameters for improved clarity

refactor: replace interpolateObject with interpolate for body
2026-01-21 15:55:21 +05:30
Cmarvin1
c94785f521 Adding interpolation utilities
Refactor interpolation

Refactor interpolation

updating tests

updating tests

minor refinements to interpolation logic

update snippet generator to handle basic auth credentials

move interpolation upstream
2026-01-21 15:55:11 +05:30
sreelakshmi-bruno
154c45d87d skip loading CA certificates when SSL verification is disabled (#6829) 2026-01-21 12:38:45 +05:30
Yash
0bf169562b feat: enhance OAuth2 support in snippet generation (#6592)
* feat: enhance OAuth2 support in snippet generation

* Updated getAuthHeaders function to handle OAuth2 authentication, including token retrieval and placement.
* Added tests for OAuth2 scenarios, ensuring correct Authorization header generation and handling of edge cases.
* Improved error handling for access token retrieval from stored credentials.

* refactor: standardize comparison operators in getAuthHeaders function

* Updated comparison operators in the getAuthHeaders function to use strict equality (===) for improved consistency and reliability in credential checks.

* fix: correct block structure in OAuth2 case of getAuthHeaders function

* Added missing block structure for the 'oauth2' case in the getAuthHeaders function to ensure proper execution flow and maintain code clarity.

* feat: enhance OAuth2 credential retrieval in getAuthHeaders function

* Updated getAuthHeaders function to support retrieval of stored OAuth2 credentials based on collection and item context.
* Improved access token handling by checking for existing credentials before falling back to default values.
* Enhanced test coverage for OAuth2 scenarios to ensure accurate token management and error handling.

* fix: preserve tokenHeaderPrefix value in OAuth2 configuration

* Updated snippet-generator.spec.js to ensure that the tokenHeaderPrefix from OAuth2 configuration is preserved, allowing for empty string scenarios.
* Default to 'Bearer' only if the tokenHeaderPrefix is undefined, enhancing flexibility in token management.

* fix: ensure consistent formatting of authorization header in OAuth2 handling

* Updated getAuthHeaders function to always trim the final result of the authorization header for consistent formatting.
* Adjusted snippet-generator.spec.js to reflect the same trimming logic for the access token, enhancing test reliability.

* fix: clarify token placement handling in getAuthHeaders function

* Updated comments in the getAuthHeaders function to specify that when tokenPlacement is 'url', no auth headers are added, and that token placement in the URL/query params must be managed separately.

* fix: ensure safe handling of OAuth2 credentials in getAuthHeaders function

* Updated getAuthHeaders function to default to an empty array when accessing oauth2Credentials, preventing potential errors when no credentials are available.
2026-01-21 12:23:05 +05:30
gopu-bruno
967b073ded fix: prevent response truncation in recursive collection runner (#6862) 2026-01-21 11:32:33 +05:30
sanish chirayath
725dfeacac feat: add user-agent support in gRPC client channel options (#6808)
* feat: add user-agent support in gRPC client channel options

- Extracted user-agent from request headers and set it as grpc.primary_user_agent channel option.
- Updated client instantiation to merge user-agent with existing channel options for enhanced request handling.

* test: add unit tests for GrpcClient user-agent handling

* test: enhance GrpcClient user-agent tests with edge case handling

* test: enhance GrpcClient channelOptions handling with override capability
2026-01-20 23:59:25 +05:30
lohit
923d26ce56 fix: get certs and proxy config based on oauth2 token and refresh urls instead of resource url (#6164) 2026-01-20 21:43:54 +05:30
lohit
7e258003d5 feat: add certs and proxy config for bruno-cli oauth2 requests (#6423) 2026-01-20 21:42:48 +05:30
Abhinandan M.S
7689288763 fix:prevent JS hint leak on Ctrl+Space and show allowed root hints (#6776) 2026-01-20 13:55:49 +05:30
fake
81faa57808 fix: add timeout for prevent ui lag (#6771) 2026-01-20 13:28:06 +05:30
naman-bruno
bac9616de4 feat: enhance SaveRequestsModal to handle environment drafts (#6857) 2026-01-20 12:40:06 +05:30
naman-bruno
9ab1ed3d90 fix: update clone collection location logic based on active workspace (#6841) 2026-01-20 12:38:31 +05:30
Sid
ebafdd813c chore: update qs package version to 6.14.1 (#6849)
Co-authored-by: Siddharth Gelera <ahoy@barelyhuman.dev>
2026-01-19 21:40:39 +05:30