mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-02 17:08:32 +00:00
23 lines
483 B
JavaScript
23 lines
483 B
JavaScript
/**
|
|
* This modules stores the configs loaded from bruno.json
|
|
*/
|
|
|
|
const config = {};
|
|
|
|
// collectionUid is a hash based on the collection path
|
|
const getBrunoConfig = (collectionUid, collection) => {
|
|
if (collection?.draft?.brunoConfig) {
|
|
return collection.draft.brunoConfig;
|
|
}
|
|
return config[collectionUid] || {};
|
|
};
|
|
|
|
const setBrunoConfig = (collectionUid, brunoConfig) => {
|
|
config[collectionUid] = brunoConfig;
|
|
};
|
|
|
|
module.exports = {
|
|
getBrunoConfig,
|
|
setBrunoConfig
|
|
};
|