From 9892f7cd40d695a64e6b4935b550cef91e7b6673 Mon Sep 17 00:00:00 2001 From: lohit Date: Fri, 19 Jul 2024 16:29:10 +0530 Subject: [PATCH] Feat/electron bump (#2668) * pr review changes * collection root object in export json * import environment updates * tests run execution order fix for collection runs * updated validations * accept request flag in curl string for method type * electron version bump to v31.2.1 --- packages/bruno-app/src/utils/curl/parse-curl.js | 11 ++++++----- packages/bruno-electron/electron-builder-config.js | 2 +- packages/bruno-electron/package.json | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/bruno-app/src/utils/curl/parse-curl.js b/packages/bruno-app/src/utils/curl/parse-curl.js index 77426da83..810d1af8a 100644 --- a/packages/bruno-app/src/utils/curl/parse-curl.js +++ b/packages/bruno-app/src/utils/curl/parse-curl.js @@ -119,15 +119,16 @@ const parseCurlCommand = (curlCommand) => { cookies = cookie.parse(cookieString.replace(/^Cookie: /gi, ''), cookieParseOptions); } let method; - if (parsedArguments.X === 'POST') { + let parsedMethodArgument = parsedArguments.X || parsedArguments.request || parsedArguments.T; + if (parsedMethodArgument === 'POST') { method = 'post'; - } else if (parsedArguments.X === 'PUT' || parsedArguments.T) { + } else if (parsedMethodArgument === 'PUT') { method = 'put'; - } else if (parsedArguments.X === 'PATCH') { + } else if (parsedMethodArgument === 'PATCH') { method = 'patch'; - } else if (parsedArguments.X === 'DELETE') { + } else if (parsedMethodArgument === 'DELETE') { method = 'delete'; - } else if (parsedArguments.X === 'OPTIONS') { + } else if (parsedMethodArgument === 'OPTIONS') { method = 'options'; } else if ( (parsedArguments.d || diff --git a/packages/bruno-electron/electron-builder-config.js b/packages/bruno-electron/electron-builder-config.js index 1b75e4d13..81e50a804 100644 --- a/packages/bruno-electron/electron-builder-config.js +++ b/packages/bruno-electron/electron-builder-config.js @@ -3,7 +3,7 @@ require('dotenv').config({ path: process.env.DOTENV_PATH }); const config = { appId: 'com.usebruno.app', productName: 'Bruno', - electronVersion: '21.1.1', + electronVersion: '31.2.1', directories: { buildResources: 'resources', output: 'out' diff --git a/packages/bruno-electron/package.json b/packages/bruno-electron/package.json index 83b98f574..b5d995858 100644 --- a/packages/bruno-electron/package.json +++ b/packages/bruno-electron/package.json @@ -61,7 +61,7 @@ "dmg-license": "^1.0.11" }, "devDependencies": { - "electron": "21.1.1", + "electron": "31.2.1", "electron-builder": "23.0.2", "electron-icon-maker": "^0.0.5" }