Commit Graph

43 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
sanjai0py
895d2ddf47 fix: update test description for default collection name handling 2025-07-02 15:12:29 +05:30
sanjai0py
a6a50f42a3 fix: handle undefined title in collection name and improve error handling
test: add unit tests for collection name handling based on OpenAPI title

fix: trim whitespace from info.title and improve default collection name handling

fix: simplify collection name assignment by using optional chaining

removed two console.log and improved the error message.

refactor: standardize single quotes in OpenAPI test cases

test: add case for empty title defaulting to Untitled Collection
2025-07-02 15:10:21 +05:30
lohxt1
1b63798ff3 handle requestConfig translations when passed to pm.sendRequest as a variable 2025-07-01 20:04:42 +05:30
sanish chirayath
9fe13f1868 Fix: postman collection fails when auth object missing auth values (#4794)
* refactor: streamline authentication handling in postman-to-bruno.js by using a switch statement and introducing AUTH_TYPES constant for better readability and maintainability

* feat: enhance authentication handling in postman-to-bruno.js to manage missing auth values across collection, folder, and request levels, ensuring a default mode of 'none'

* fix: update authentication handling in postman-to-bruno.js to correctly set auth mode based on provided auth type

* fix: update authentication tests to ensure default values are set for various auth types in postman-to-bruno
2025-06-24 16:32:32 +05:30
sanish chirayath
2bbfb28090 fix: handle falsy values in Postman environment and collection variables (#4924)
* fix: handle falsy values in Postman environment and collection variables

* Updated the `postman-env-to-bruno-env` and `postman-to-bruno` converters to handle cases where variable keys or values are falsy, ensuring they default to empty strings.
* Added unit tests to verify the correct handling of falsy values in both environment and collection variables.

* fix: filter out null/undefined keys and values in Postman variable imports

* Updated the `postman-env-to-bruno-env` and `postman-to-bruno` converters to filter out variables with null keys and values during import.
* Removed redundant test cases for empty variables in the corresponding unit tests.
2025-06-24 15:58:29 +05:30
Phil Jones
3fe3eec465 Add support for integer and boolean in OpenAPI to Bruno converter (#4734) 2025-06-20 12:16:41 +05:30
lohit
a05f7cb686 Merge pull request #4918 from lohxt1/bru_send_request_fixes
bru.sendRequest translation fixes
2025-06-17 00:26:39 +05:30
lohit
745a71700c add await keyword to the translated bru.sendRequest function calls (#4906)
* add await keyword for the bru.sendRequest postman translations

---------

Co-authored-by: lohit <lohit@usebruno.com>
2025-06-16 22:50:45 +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
Pooja
fc697bf81b feat: support chai in scripts (#4552)
feat: support chai in scripts
2025-06-10 22:41:11 +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
Pooja
3696562414 fix: circular recursion for openapi import (#4729) 2025-05-21 15:10:35 +05:30
lohit
6073a9e2c3 fix bruno converters test for reg.getName() 2025-05-16 21:27:00 +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
Pooja
799dc9a1ca feat: add function in bruno converters package (#4669)
* feat: add  function in bruno converters package

* add: example for openapi yaml to bruno conversion

* add: converting json to yaml in converters

* fix
2025-05-16 17:26:40 +05:30
sanish-bruno
1daeb8fe93 fix: regex tranasaltion for to.have.headers 2025-05-09 19:12:52 +05:30
sanish-bruno
3dfb158382 feat: add missing translations 2025-05-09 17:56:32 +05:30
lohit
4c934a78a6 fix tests for postmanToBrunoEnvironment function 2025-05-09 00:07:58 +05:30
Sanjai Kumar
a125781312 feat/replace unsupported characters in env key during pm import (#4618)
---------

Co-authored-by: sanjai0py <sanjailucifer666@gmail.com>
2025-05-08 21:52:58 +05:30
sanish chirayath
dfa951e574 Feature: postman to bru translator (#4534) 2025-05-08 21:51:21 +05:30
lohit
38c307d6f1 feat: folder sequencing (#4595)
Co-authored-by: Pooja Belaramani <pooja@usebruno.com>
Co-authored-by: naman-bruno <naman@usebruno.com>
Co-authored-by: lohit <lohit@usebruno.com>
2025-05-05 16:52:00 +05:30
poojabela
cb92e46f8d feat: add req.getName api 2025-04-30 15:14:36 +05:30
Anoop M D
526fcabffe Support Importing Collection Level Auth from Postman (Merge pull request #4475) 2025-04-22 21:27:06 +05:30
Pragadesh-45
46dab6e474 test: add request authentication tests for basic and bearer auth handling 2025-04-22 20:25:27 +05:45
Pragadesh-45
c7e8c07d40 test: add folder authentication tests for basic, bearer, API key, and digest auth 2025-04-22 19:56:03 +05:45
Pragadesh-45
932d2b77dc test: add collection authentication tests for basic, bearer, API key, and digest auth 2025-04-22 19:10:28 +05:45
Pragadesh-45
049de84cbb test: refactor postman-to-bruno.spec.js by adding a simple collection 2025-04-22 18:00:49 +05:45
pooja-bruno
3bd44ea7ef Refactor: Reorganize Postman translation tests into modules (#4524) 2025-04-22 16:42:09 +05:30
pooja-bruno
317ccccfc6 fix: Add null checks and fallbacks to Bruno-to-Postman converter to… (#4525) 2025-04-22 16:40:15 +05:30
Pragadesh-45
6a7750d354 refactor: rename test files and update import paths for postman-to-bruno tests 2025-04-22 15:19:04 +05:45
Pragadesh-45
4c23ab5664 Merge remote-tracking branch 'origin/main' into fix/import-pm-collection-improvements 2025-04-21 19:03:34 +05:45
lohit
e34e2ec1f1 feat: support object and array interpolation in bruno-common interpolate fn (#4519)
---------
Co-authored-by: Pooja Belaramani <pooja@usebruno.com>
Co-authored-by: lohit jiddimani <lohitjiddimani@lohits-MacBook-Air.local>
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
2025-04-18 00:47:02 +05:30
pooja-bruno
1703346bb6 feat: improve postman translations: pm.request and pm.response (#4517) 2025-04-16 19:19:31 +05:30
pooja-bruno
e5ebe20a20 feat: add insomnia v5 import (#4468) 2025-04-16 02:37:48 +05:30
Pragadesh-45
92925648e6 fix: OAuth2 key value retrieval 2025-04-10 21:14:22 +05:45
Pragadesh-45
811c492bce fix: improve URL construction by handling empty input and filtering invalid query parameters 2025-04-10 21:14:22 +05:45
Pragadesh-45
73fa2e19e4 fix: enhance error handling for unsupported Postman schema versions and invalid JSON format 2025-04-10 21:13:49 +05:45
Pragadesh-45
f1d527aa9c feat: implement support for various authentication types in Postman to Bruno converter 2025-04-10 18:55:03 +05:45
ganesh
838f25b9db added example to readme file (#4471)
* added example to readme file
* modified example
2025-04-10 03:55:30 +05:30
lohxt1
9bb9a914ac postman-to-bruno converter package fixes 2025-04-08 20:38:38 +05:30
Thim
9845363349 Feat: Standalone Package to convert to Bruno collection(Part 2)
This contains the bulk of the changes apart from renaming files.
This is a continuation of #2341.

Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: pooja-bruno <pooja@usebruno.com>
2025-04-07 22:24:57 +05:30
Thim
1a6fa7a799 Feat: Standalone Package to convert to Bruno collection(Part 1)
This commit just moves the required files to the new destination
using `git mv` to force Git to recognise it as `Renamed`.
This is a continuation of #2341.

Co-authored-by: lohit <lohit@usebruno.com>
Co-authored-by: pooja-bruno <pooja@usebruno.com>
Co-authored-by: ramki-bruno <ramki@usebruno.com>
2025-04-07 22:24:57 +05:30