From faa2ef5de2badb80c844973c0bd1fa86db799b1b Mon Sep 17 00:00:00 2001 From: Bijin A B Date: Thu, 20 Nov 2025 19:13:33 +0530 Subject: [PATCH] Merge pull request #6162 from bijin-bruno/fix/bruno-to-postman-converter fix: sync bruno to postman converter with enterprise edition --- packages/bruno-converters/src/postman/bruno-to-postman.js | 7 ++++--- .../tests/bruno/bruno-to-postman-with-tests.spec.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/bruno-converters/src/postman/bruno-to-postman.js b/packages/bruno-converters/src/postman/bruno-to-postman.js index 3ee944719..42f1e8e1a 100644 --- a/packages/bruno-converters/src/postman/bruno-to-postman.js +++ b/packages/bruno-converters/src/postman/bruno-to-postman.js @@ -1,5 +1,5 @@ import map from 'lodash/map'; -import { deleteSecretsInEnvs, deleteUidsInEnvs, deleteUidsInItems } from '../common'; +import { deleteSecretsInEnvs, deleteUidsInEnvs, deleteUidsInItems, isItemARequest } from '../common'; /** * Transforms a given URL string into an object representing the protocol, host, path, query, and variables. @@ -467,7 +467,7 @@ export const brunoToPostman = (collection) => { item: generateItemSection(item.items), ...(folderEvents.length ? { event: folderEvents } : {}) }; - } else { + } else if (isItemARequest(item)) { const requestEvents = generateEventSection(item.request); const postmanItem = { name: item.name || 'Untitled Request', @@ -482,7 +482,8 @@ export const brunoToPostman = (collection) => { return postmanItem; } - }); + return null; + }).filter(Boolean); }; const collectionToExport = {}; collectionToExport.info = generateInfoSection(); diff --git a/packages/bruno-converters/tests/bruno/bruno-to-postman-with-tests.spec.js b/packages/bruno-converters/tests/bruno/bruno-to-postman-with-tests.spec.js index 30bf33466..e8d91e053 100644 --- a/packages/bruno-converters/tests/bruno/bruno-to-postman-with-tests.spec.js +++ b/packages/bruno-converters/tests/bruno/bruno-to-postman-with-tests.spec.js @@ -7,7 +7,7 @@ describe('Bruno to Postman Converter with Tests and Scripts', () => { items: [ { name: 'Request With Scripts and Tests', - type: 'http', + type: 'http-request', filename: 'request-with-scripts.bru', seq: 1, settings: {