feat: enhance json environment file support in bruno-cli (#5660)

* feat: enhance json environment file support in bruno-cli

feat: add parseEnvironmentJson function to normalize environment JSON structure

lint fixes

feat: added tests for invalid JSON environment files in CLI and added missing constant defenition.

feat: improve JSON environment file handling and update tests

Trigger test

fix: update CLI command syntax for non-existent JSON environment file test

fix: correct CLI command syntax in test for non-existent JSON environment file

fix: update CLI command syntax in test for non-existent JSON environment file

fix: update test to use temporary path for non-existent JSON environment file

trying to fix the tests

fix tests

refactor: rename ERROR_INVALID_JSON to ERROR_INVALID_FILE and update related error handling in CLI commands and tests

fix: update parseEnvironmentJson to preserve secret flag

test: improved tests

* refactor: move parseEnvironmentJson function to utils/ environment.js file and update imports

* test: update tests
This commit is contained in:
Sanjai Kumar
2025-10-07 12:49:22 +05:30
committed by GitHub
parent 1cc3a6432a
commit 8d2f087206
8 changed files with 233 additions and 6 deletions

View File

@@ -23,6 +23,8 @@ const EXIT_STATUS = {
ERROR_INCORRECT_ENV_OVERRIDE: 8,
// Invalid output format requested
ERROR_INCORRECT_OUTPUT_FORMAT: 9,
// Invalid file format
ERROR_INVALID_FILE: 10,
// Everything else
ERROR_GENERIC: 255
};