From d1ebfbe29c457801147f6ee120708e606805100f Mon Sep 17 00:00:00 2001 From: Pragadesh-45 Date: Mon, 28 Oct 2024 14:58:03 +0530 Subject: [PATCH] fix: added missing translation --- packages/bruno-app/src/components/CodeEditor/index.js | 2 +- .../src/utils/importers/translators/postman_translation.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 8b43c1db6..5d8ff2627 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -58,7 +58,7 @@ if (!SERVER_RENDERED) { 'req.getExecutionMode()', 'bru', 'bru.cwd()', - 'bru.getEnvName(key)', + 'bru.getEnvName()', 'bru.getProcessEnv(key)', 'bru.hasEnvVar(key)', 'bru.getEnvVar(key)', diff --git a/packages/bruno-app/src/utils/importers/translators/postman_translation.js b/packages/bruno-app/src/utils/importers/translators/postman_translation.js index ae5cd093d..f43eeabc9 100644 --- a/packages/bruno-app/src/utils/importers/translators/postman_translation.js +++ b/packages/bruno-app/src/utils/importers/translators/postman_translation.js @@ -17,7 +17,8 @@ const replacements = { 'pm\\.response\\.code': 'res.getStatus()', 'pm\\.response\\.text\\(': 'res.getBody()?.toString(', 'pm\\.expect\\.fail\\(': 'expect.fail(', - 'pm\\.response\\.responseTime': 'res.getResponseTime()' + 'pm\\.response\\.responseTime': 'res.getResponseTime()', + 'pm\\.environment\\.name': 'bru.getEnvName()' }; const extendedReplacements = Object.keys(replacements).reduce((acc, key) => {