build-api-docs-from-bruno

1.1.15 • Public • Published

build-api-docs-from-bruno

NPM Version NPM Unpacked Size

NPM License GitHub last commit NPM Downloads

Coverage

Table of Contents

Description
Usage

Contributing
Changelog

Enhancements for Future Versions

Description

This command line tool will build API documentation from Bruno collection (.bru) files. Each of these files contains an optional docs section which contains Markdown documentation for the endpoint. This tool will parse the .bru files and generate a single Markdown file containing the documentation for each endpoint. The resulting Markdown file will be saved to the output directory.

Usage

Environment Variables

Variable Name Description Values Default Value
LOG_LEVEL The level of logging to use for the log file. Console log level is always info. error
warn
info
verbose
debug
verbose

From the root directory of the project, run the following command:

npx build-api-docs-from-bruno@latest [command] {options}

Global Options

Switch Type Default Required Description
-q --silent boolean false Optional Suppresses all output to the console.
-r --verbose boolean false Optional Outputs additional information to the console.
--help Displays help information.
-v --version Displays version information.

Commands

Default

build

Builds the API documentation from the Bruno collection files.

Switch Type Default Required Description
-s --source string Required The path to the source directory containing the Bruno collection files.
-d --destination string Required The path to the output directory.
-t --test boolean false Optional Test the build process without writing the output file.

Examples

Examples will be provided in a future release.

License

GNU General Public License (GPL)

This software is licensed under the GNU General Public License (GPL). The GPL allows users to freely use, copy, modify, and distribute this software under the following conditions:

  • Any modified versions of this software must also be licensed under the GPL.

  • The original or modified software cannot be sold or used for profit.

  • The source code must be made available when distributing the software.

For more detailed information, please visit the official GNU GPL website.

Contributing

To contribute, contact RamonaSteve.

Change Log

Release 1.1.15

  • [x] Remove console logging for debugging file transport

Release 1.1.14

  • [x] Add exception handling for file transport

Release 1.1.13

  • [x] Added console logging for debugging file transport

Release 1.1.12

  • [x] Refactor logger to enhance logged information
  • [x] Revert console log level to info
  • [x] Add environment variable usage to README.md
  • [x] Enhance logging for file overwrite
  • [x] Remove deprecated code
  • [x] Correct path for saving configuration file

Release 1.1.11

  • [X] Added more debug code

Release 1.1.10

  • [X] Correct path for retrieval of Bruno files

Release 1.1.9

  • [X] Add additional logging
  • [X] Correct path for retrieval of Bruno files

Release 1.1.8

  • [X] Correct file path for source files

Release 1.1.7

  • [X] Update console log level to debug
  • [X] Correct file path for output file

Release 1.1.6

  • [X] Add publishConfig to package.json
  • [X] Set console logging to Verbose for debugging
  • [X] Update TOC in README.md

Release 1.1.5

  • [X] Add function to get logger's file transport path
  • [X] Write log file path to console at startup
  • [X] Remove unneeded debug code

Release 1.1.4

  • [X] Add debug code for logging

Release 1.1.3

  • [X] Fix regular expression for configuration file name

Release 1.1.2

  • [X] Fix output path for logger
  • [X] Fix location for default configuration file
  • [X] Fix location for all file reads and writes

Release 1.1.1

  • [X] Remove CSS styling from README.md

Release 1.1.0

  • [X] Add error handling for source directory not existing
  • [X] Add header content from header.md or a specified file
  • [X] Add interactive mode
  • [X] Add silent mode
  • [X] Add support for a list of files or directories to exclude that are in the source path and end with .bru
  • [X] Add tail content from tail.md or a specified file
  • [X] Add test mode to run process and check for errors but not writing output file
  • [X] Add verbose mode
  • [X] Allow input of source path, output path and output file name
  • [X] Display message if no command is provided
  • [X] Make default command guided and remove the guided command
  • [X] Update README.md
  • [X] Update unit tests; target 80% coverage

Enhancements in Progress

None

Enhancements for future versions

  • [ ] Add example to README.md
  • [ ] Convert from tsc to swc
  • [ ] Correct npm badge in README.md
  • [ ] Ensure all functions have current documentation
  • [ ] Update Commands in README.md
  • [ ] Update Examples in README.md
  • [ ] Update Global Options in README.md

Package Sidebar

Install

npm i build-api-docs-from-bruno

Weekly Downloads

4

Version

1.1.15

License

GPL-3.0

Unpacked Size

434 kB

Total Files

59

Last publish

Collaborators

  • ramonasteve