Merge pull request #6162 from bijin-bruno/fix/bruno-to-postman-converter

fix: sync bruno to postman converter with enterprise edition
This commit is contained in:
Bijin A B
2025-11-20 19:13:33 +05:30
committed by GitHub
parent c05d56fd21
commit faa2ef5de2
2 changed files with 5 additions and 4 deletions

View File

@@ -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();

View File

@@ -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: {