🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@rovast/api-recorder

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rovast/api-recorder

A tool for recording your api

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

api-recorder

Issues GitHub license GitHub license

简体中文 | English

使用场景

录制浏览网站的 API,记录结果,并导出至 Postman。可用于以下场景:

1. MOCK 已有网站

通过录制 API 和其结果,可以将其返回结果作为数据 MOCK 的返回值。这样就可以达到快速 mock 已有网站的目的。

2. 补录 API 文档

对于已有的网站,如果需要补录 API 文档,可直接通过该工具打开浏览器访问网站,导入 Postman 即可。

使用方法

1. 安装

npm i -g @rovast/api-recorder

2. 使用

api-recorder

会自动打开浏览器,直接访问自己需要录制的网站即可。

关闭浏览器时,会自动在配置的 output 中生成文件

配置


Usage: index [options]

A tool for record your api

Options:
  -n, --name <name>             collection name (default: "record-api")
  -o, --output <output_file>    output json file path (default: "postman-collection.json")
  -b, --browser <execute_path>  browser execute path (default: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome")
  -m, --match <regex>           match the api path (default: "/api/")
  -h, --help                    display help for command

贡献

npm run build # 构建 TS 至 JS
npm run dev:start # 监听变化,实时编译

FAQs

Package last updated on 06 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts