mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
Folder level Headers, Scripts and Tests (#2529)
* [Feature] : Settings on folder level (#1334) * feat(folder_settings): enable settings tab from folder, currently not using folder.bru * feat(folder_settings): read and write in folder settings only in headers, ignore folder.bru file il requests list * feat(folder_settings): merge collection and folder settings when sending network request * feat(folder_settings): remove console, testing headers merging working fine * feat(folder_settings): add missing endl for prettier check, remove redundant imports --------- Co-authored-by: Baptiste POULAIN <baptistepoulain@MAC882.local> Co-authored-by: Anoop M D <anoop.md1421@gmail.com> * feat: folder level scripts and tests * feat: folder level variables (#2530) --------- Co-authored-by: Baptiste Poulain <64689165+bpoulaindev@users.noreply.github.com> Co-authored-by: Baptiste POULAIN <baptistepoulain@MAC882.local> Co-authored-by: lohit <lohit.jiddimani@gmail.com>
This commit is contained in:
@@ -179,6 +179,17 @@ const getCollectionRoot = (dir) => {
|
||||
return collectionBruToJson(content);
|
||||
};
|
||||
|
||||
const getFolderRoot = (dir) => {
|
||||
const folderRootPath = path.join(dir, 'folder.bru');
|
||||
const exists = fs.existsSync(folderRootPath);
|
||||
if (!exists) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const content = fs.readFileSync(folderRootPath, 'utf8');
|
||||
return collectionBruToJson(content);
|
||||
};
|
||||
|
||||
const builder = async (yargs) => {
|
||||
yargs
|
||||
.option('r', {
|
||||
|
||||
Reference in New Issue
Block a user