diff --git a/.gitignore b/.gitignore index 9a159a6c7a..83c237eb8a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # dependencies node_modules yarn.lock +bun.lockb pnpm-lock.yaml .pnp .pnp.js diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000..3e7978c079 Binary files /dev/null and b/bun.lockb differ diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js index dade095edd..825c179523 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js @@ -119,7 +119,6 @@ const Collection = ({ collection, searchText }) => { const requestItems = sortRequestItems(filter(collection.items, (i) => isItemARequest(i))); const folderItems = sortFolderItems(filter(collection.items, (i) => isItemAFolder(i))); - return ( {showNewRequestModal && setShowNewRequestModal(false)} />} diff --git a/packages/bruno-app/src/components/Sidebar/Collections/index.js b/packages/bruno-app/src/components/Sidebar/Collections/index.js index e5a657ef95..c250764719 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/index.js @@ -66,7 +66,6 @@ const Collections = () => { const [searchText, setSearchText] = useState(''); const { collections } = useSelector((state) => state.collections); const [createCollectionModalOpen, setCreateCollectionModalOpen] = useState(false); - if (!collections || !collections.length) { return ( diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js index 2e4d6b87cc..524173c71f 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js @@ -324,7 +324,6 @@ export const collectionsSlice = createSlice({ }, collectionClicked: (state, action) => { const collection = findCollectionByUid(state.collections, action.payload); - if (collection) { collection.collapsed = !collection.collapsed; } @@ -334,7 +333,6 @@ export const collectionsSlice = createSlice({ if (collection) { const item = findItemInCollection(collection, action.payload.itemUid); - if (item && item.type === 'folder') { item.collapsed = !item.collapsed; } diff --git a/packages/bruno-app/src/utils/collections/index.js b/packages/bruno-app/src/utils/collections/index.js index 05dd0fb436..a6f8bf5ac0 100644 --- a/packages/bruno-app/src/utils/collections/index.js +++ b/packages/bruno-app/src/utils/collections/index.js @@ -103,7 +103,6 @@ export const findItemInCollectionByPathname = (collection, pathname) => { export const findItemInCollection = (collection, itemUid) => { let flattenedItems = flattenItems(collection.items); - return findItem(flattenedItems, itemUid); }; diff --git a/packages/bruno-electron/src/app/watcher.js b/packages/bruno-electron/src/app/watcher.js index 51fa79f6f3..4cfb1b5ab0 100644 --- a/packages/bruno-electron/src/app/watcher.js +++ b/packages/bruno-electron/src/app/watcher.js @@ -251,9 +251,7 @@ const add = async (win, pathname, collectionUid, collectionPath) => { try { let bruContent = fs.readFileSync(pathname, 'utf8'); - file.data = bruToJson(bruContent); - hydrateRequestWithUuid(file.data, pathname); win.webContents.send('main:collection-tree-updated', 'addFile', file); } catch (err) { diff --git a/packages/bruno-electron/src/bru/index.js b/packages/bruno-electron/src/bru/index.js index de1080ac0e..b7611c3bc9 100644 --- a/packages/bruno-electron/src/bru/index.js +++ b/packages/bruno-electron/src/bru/index.js @@ -92,7 +92,6 @@ const envJsonToBru = (json) => { const bruToJson = (bru) => { try { const json = bruToJsonV2(bru); - let requestType = _.get(json, 'meta.type'); if (requestType === 'http') { requestType = 'http-request'; diff --git a/packages/bruno-lang/v2/src/bruToJson.js b/packages/bruno-lang/v2/src/bruToJson.js index fbe289974a..73fd6d03b5 100644 --- a/packages/bruno-lang/v2/src/bruToJson.js +++ b/packages/bruno-lang/v2/src/bruToJson.js @@ -105,7 +105,7 @@ const mapPairListToKeyValPairs = (pairList = [], parseEnabled = true) => { } return _.map(pairList[0], (pair) => { let name = _.keys(pair)[0]; - let value = decodeURIComponent(pair[name]); + let value = name === 'password' ? pair[name] : decodeURIComponent(pair[name]); if (!parseEnabled) { return {