Commit Graph

25 Commits

Author SHA1 Message Date
Pooja
fbc77fc725 feat: introduce res.getSize() helper (header/body/total) (#5018)
* feat: introduce `res.getSize()` helper (header/body/total)

* fix: unit test

* rm: request-duration from collection runner header

* change: api for getSize

* fix

* improve: getSize method

* add: todo comment

---------

Co-authored-by: lohit <lohit@usebruno.com>
2025-07-08 21:00:05 +05:30
Maintainer Bruno
803d2d96c9 fix: unit tests and e2e 2025-07-03 13:31:19 +05:30
lohit
f03047a2f9 feat: bru.sendRequest api (#4867)
* feat: bru.sendRequest api

* updated the postman-translations logic to handle `pm.sendRequest` to `bru.sendRequest` translations, and added unit tests

* ~ removed `maxRedirects` and `proxy` values for sendRequest axios-instance
~ fixed the imports for the `send-request-transformer` function
~ `sendRequest` and `runRequest` will return same response object in both safe and developer mode
~ sendRequest function optimization

* revert sendRequest to async function, added a testcase for sendRequest with url string

* sendRequest callback errors handling

* updated tests and added await for the callbacks

---------

Co-authored-by: lohit <lohit@usebruno.com>
2025-06-14 22:18:31 +05:30
sanish chirayath
9a35302d4b Feature: implemented bru.interpolate (#4122)
* feat: enhance variable highlighting in CodeMirror and update interpolation method

* feat: add interpolate function to bru shim and corresponding tests

- Implemented the `interpolate` function in the bru shim to handle variable interpolation.
- Added a new test case for the `interpolate` function to verify its functionality with mock variables.

* feat: enhance interpolate function to support object interpolation

* feat: add translation support for pm.variables.replaceIn to bru.interpolate

* revert: eslint config changes

* revert: eslint config changes

* fix: update method call to use correct interpolation function in Bru class

* refactor: added jsdoc to codemirror highlighting code

* fix: higlighting for multiline editor
2025-05-22 15:37:15 +05:30
lohit
2a44691cb3 Merge pull request #4590 from poojabela/feat/add-getName-api-for-script
feat: add `req.getName` & `bru.getCollectionName` api
2025-05-16 20:21:35 +05:30
sanish chirayath
e4f48e81fc feat: add setBody test script to bruno-tests collection (#4415) 2025-05-09 14:16:29 +05:30
Pooja Belaramani
2852c07ec7 feat: support tv4 as a inbuilt lib (#4589) 2025-05-07 17:44:29 +05:30
poojabela
e0fb379511 add: bru.collectionName api 2025-04-30 17:25:42 +05:30
poojabela
ba9362ccb2 add: getName in collection 2025-04-30 15:36:44 +05:30
Andreas Wirth
9a21eec1b9 Bugfix: Add cheerio and xml2js modules to post-response scripts (#4516)
* Bugfix: Add cheerio and xml2js modules to post-response scripts
* chore: improved cheerio and xml2js test
---------

Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
2025-04-17 01:31:53 +05:30
Pragadesh-45
2385c4d5c1 feat: add statusText support to BrunoResponse on safe mode
Enhance BrunoResponse with statusText functionality:
- Added `getStatusText()` method to BrunoResponse class
- Updated QuickJS shim to support statusText
2025-03-13 01:37:10 +05:30
Anoop M D
4c1765e9f9 feat(#2896): add support for cheerio and xml2json as inbuilt library 2025-02-10 18:55:20 +05:30
lohxt1
ff5683f19f add runRequest and runner utils functions to cli
~ add bru.runRequest support for cli
~ add bru.runner.skipRequest, bru.runner.stopExecution support for cli
2025-01-29 11:53:02 +05:30
lohxt1
d13e4b3b54 ensure variables set in scripts/tests during bru.runRequest reflect in original request scripts/tests 2025-01-29 11:53:02 +05:30
lohxt1
3fe0d43bdc fix: cli - collection level script, added tests 2024-12-06 22:58:02 +05:30
lohxt1
4b4bd3bc95 fix: updates 2024-12-05 15:45:36 +05:30
Anoop M D
46017a6c50 chore: removed collection vars test as cli support is not yet ready 2024-09-04 11:20:03 +05:30
Anoop M D
cb395e7649 Collection Variables Support (#2963) (#3018)
Support for Collection Variables
---------

Co-authored-by: lohit <lohit.jiddimani@gmail.com>
Co-authored-by: lohit <lohxt.space@gmail.com>
2024-09-03 21:18:38 +05:30
lohit
4bdbfb5c0c fix: safe mode validations (#2912) 2024-08-24 14:29:43 +05:30
lohit
44d70ca02a fix: boolean, undefined, null values eval in quickjs vm (#2893)
fix: boolean, undeifned, null values in pre-request vars
2024-08-23 16:18:41 +05:30
lohit
e4407f3981 chore: updated testbench - primitive data types (#2888)
* fix: getRequestVar shim, boolean values in vm
* chore: updated testbench
2024-08-22 11:37:13 +05:30
Anoop M D
753a576c3c Feat/safe mode quickjs (#2848)
Safe Mode Sandbox using QuickJS
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
Co-authored-by: lohit <lohit.jiddimani@gmail.com>
2024-08-21 12:52:49 +05:30
Anoop M D
d027d90ed5 fix(#2079): test cases to catch getEnvName() error in the future 2024-04-18 17:52:36 +05:30
Anoop M D
4d8c377143 test: added local module scripting example 2024-02-01 16:49:48 +05:30
Anoop M D
e258e7f5ab fix(#1487): rolling back to vm2 from @n8n/vm2 2024-01-30 22:00:58 +05:30