- 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.
- 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.
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
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>
* feat: apply modified dataBuffer to the response
* fix: ensure dataBuffer regeneration only occurs when res.setBody() is called
* refactor: update dataBuffer handling in BrunoResponse
When jsonwebtoken throws errors inside the NodeVM context, those errors
were instances of the VM's isolated Error class, which caused
instanceOf(Error) checks in tests to fail.
By adding Error constructors (Error, TypeError, ReferenceError,
SyntaxError, RangeError) from the global scope to the scriptContext,
errors thrown by jsonwebtoken and other modules now use the same Error
class that tests check against, ensuring instanceOf checks pass correctly.
This fixes jsonwebtoken test failures when using the NodeVM runtime.
* fix: enhance cleanJson to support serialization of typed arrays
* fix: correctness of inference based checks
* fix: remove duplicate Uint8Array reference
* fix: correct export syntax for mixinTypedArrays
Updated the export statement to use 'exports' instead of 'export' for proper module export functionality.
* chore: code cleanup
* test: add basics tests for cleanJson
- Added interpolation to setVar method's value field.
- Added playwright test to test the fix.
- Added jest test to test out the fix.
---
Playwright - PASS
Jest - PASS
---
* Import WSDL to bruno collection
* feat(wsdl-import): remove unused code and minor refactor
---------
Co-authored-by: Bijin Bruno <bijin@usebruno.com>