mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-28 23:24:05 +00:00
* feat: implement OpenAPI Sync * feat: enhance focus styles and error handling across components - Added focus-visible styles for buttons and tags in Swagger and Modal components to improve accessibility. - Updated ConnectSpecForm to ensure source URL is set only if the file path is valid. - Enhanced clipboard copy functionality in SpecInfoCard with error handling and success notifications. - Improved ExpandableEndpointRow to handle loading state more robustly. - Refined SyncReviewPage to ensure correct filtering of updated endpoints. - Updated file handling in OpenAPI Sync IPC to support both .yml and .yaml extensions. * fix: improve filename sanitization in OpenAPI Sync IPC - Updated filename sanitization logic to ensure proper handling of both `name` and `filename` properties, enhancing compatibility with various file formats. - Adjusted the logic to derive the base name from the filename when necessary, ensuring consistent output for generated files. * feat: enhance OpenAPI Sync tab with new overview and header components - Introduced OverviewSection to display summary of collection and spec status, including total endpoints, in-sync counts, and pending updates. - Added OpenAPISyncHeader for improved navigation and actions related to the OpenAPI spec. - Updated CollectionStatusSection to better handle and display collection drift information. - Refined styling for status banners and added new visual elements for better user experience. - Enhanced tooltip functionality in Help component for improved accessibility. * refactor: remove VisualDiffViewer components and add diff package - Deleted VisualDiffViewer components including VisualDiffMeta, VisualDiffDocs, VisualDiffVars, and others to streamline the codebase. - Introduced the 'diff' package in package-lock.json to enhance diff functionality. - Updated utility functions to improve diff status handling and maintainability.
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
.bruformat - 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 contentstringifyRequest(requestObj, options = { format: 'bru' }): Convert request object to file contentparseCollection(content, options = { format: 'bru' }): Parse collection file contentstringifyCollection(collectionObj, options = { format: 'bru' }): Convert collection object to file contentparseFolder(content, options = { format: 'bru' }): Parse folder file contentstringifyFolder(folderObj, options = { format: 'bru' }): Convert folder object to file contentparseEnvironment(content, options = { format: 'bru' }): Parse environment file contentstringifyEnvironment(envObj, options = { format: 'bru' }): Convert environment object to file contentparseDotEnv(content): Parse .env file content