* 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
* 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
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
* 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.
* 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
Add `isSafeMode()` to Bru API that returns `true` in
case the runtime is a sandbox.
This allows for scripts to test for and handle whether
running in sandbox or not:
```javascript
if (bru.isSafeMode()) {
throw new Error('This script requires Developer mode')
}
```
Co-authored-by: Anoop M D <anoop@usebruno.com>
* fix: include auth in request data for GenerateCodeItem
* fix: conditionally include auth in request data for GenerateCodeItem
* fix: simplify auth inclusion in requestData
* fix: streamline auth assignment in requestData for GenerateCodeItem
* fix: clarify comments on auth resolution