Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Latest commit

 

History

History
25 lines (15 loc) · 1.31 KB

README.md

File metadata and controls

25 lines (15 loc) · 1.31 KB

Routes Scraper

Search for a specific API URL in your fullstack application source, leveraging the power of SWC (what the NextJS's compiler uses) to accurately find usages of a given endpoint.

Your fullstack project must adhere to the specification that the example test_data project structure showcase. If your files don't follow this structure, you will get gentle and helpful errors when the scraper tries to parse these files.

Installation

Ensure that you have the latest stable Rust toolchain installed. If you don't, you can get it through rustup. Then run the following command (beware that Rust compile times are known to be lengthy):

cargo install --git https://github.com/regexPattern/routes-scraper

Remember that you should add your $CARGO_HOME to your shell path. Read more about this here.

Usage

The CLI application documents itself. The display the help menu pass the --help flag when running the command:

routes-scraper --help

Since the scraper outputs the results as a JSON array of route objects, it is recommended to use a tool like jq to process these results.