Files
bruno/packages/bruno-filestore
sanish-bruno 4bb01ca0ac feat: hooks runtime
add: hooks component

add support for hooks within bruno-lang

fix: hooks is not getting save

hooks implemtation

add hooks component within folders, requests

add: quick js shims for hooks

fix: garbage collected hook managers

send logs to main

rm: hook manager store

feat: introduce HOOK_EVENTS constant for improved hook management

add folder start/end events

add folder run events

rm: folder run related events

add cli support for hooks

support script:hooks instead of hooks

move hooks to script tab

make outer scope available within callback in safemode

added runner, req apis as an abstraction over event based hooks

fix: crash while editing folder hooks

rm: unused files

fix: self review changes

refactor, request specific hook manager deleted once

add: cm

rm: spaces

add prompt var

rm: indent

fix: lint

refactor: shims handling for hooks

fix: enable async calling in dev mode for gui, cli

fix: support async callbacks within safe mode

rm: vm instance

fix: review comments

fix: review comments

add cli tests for hooks

rm: client certs

fix: add hooks to oc yaml

fix: rename uid ot path name for better clarity, app crash when saving folder hooks

rm: console

rm: vm2 runtime leftover

rm: check

add: handler cleanup function

add: playwright test case for hooks

rm: review fixes

fix: review comments

add fallback hook manager

add fallback hook manager

fix: show error from hooks scripts within response pane

change: collection events name

feat: add name spaced hooks

fix: review comments

add: hooks specific collection for testing

use hooks manager as a private field

fix: tests

use collection from bruno-test within playwright

rm: databuffer test

fix: playwright test

rm: unintended changes

rm: file
2026-01-28 19:13:57 +05:30
..
2026-01-28 19:13:57 +05:30
2025-12-27 13:52:20 +05:30
2025-12-18 21:19:29 +05:30

Bruno Filestore

A generic file storage and parsing package for Bruno API client.

Purpose

This package abstracts the file format operations for Bruno, providing a clean interface for parsing and stringifying Bruno requests, collections, folders, and environments.

Features

  • Format-agnostic APIs for file operations
  • Currently supports Bruno's custom .bru format
  • Designed for future extensibility to support YAML and other formats

Usage

const {
  parseRequest,
  stringifyRequest,
  parseCollection,
  stringifyCollection,
  parseEnvironment,
  stringifyEnvironment,
  parseDotEnv
} = require('@usebruno/filestore');

// Parse a .bru request file
const requestData = parseRequest(bruContent);

// Stringify request data to .bru format
const bruContent = stringifyRequest(requestData);

// Example with future format support (not yet implemented)
const requestData = parseRequest(yamlContent, { format: 'yaml' });

API

The package provides the following functions:

  • parseRequest(content, options = { format: 'bru' }): Parse request file content
  • stringifyRequest(requestObj, options = { format: 'bru' }): Convert request object to file content
  • parseCollection(content, options = { format: 'bru' }): Parse collection file content
  • stringifyCollection(collectionObj, options = { format: 'bru' }): Convert collection object to file content
  • parseFolder(content, options = { format: 'bru' }): Parse folder file content
  • stringifyFolder(folderObj, options = { format: 'bru' }): Convert folder object to file content
  • parseEnvironment(content, options = { format: 'bru' }): Parse environment file content
  • stringifyEnvironment(envObj, options = { format: 'bru' }): Convert environment object to file content
  • parseDotEnv(content): Parse .env file content