# @fresha/har-extract

> CLI for extracting API data from HAR files

Latest version **0.4.0** (published 2023-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fresha/har-extract
pnpm add @fresha/har-extract
yarn add @fresha/har-extract
bun add @fresha/har-extract
```

Provides the command `fresha-har-extract`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2023-06-21 |
| First published | 2022-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 21.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Fresha Engineering |
| Maintainers | dziala, kondrat-fresha, dnaploszek, rafal.panasiuk.fresha, mykulyak, fresha_root, wokay_fresha |
| Keywords | HAR, API |

## Links

- npm: https://www.npmjs.com/package/@fresha/har-extract
- Repository: https://github.com/surgeventures/api-tools
- Homepage: https://github.com/surgeventures/api-tools#readme
- Issues: https://github.com/surgeventures/api-tools/issues
- npm.io page: https://npm.io/package/@fresha/har-extract

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^17.5.1
- [@fresha/api-tools-core](https://npm.io/package/@fresha/api-tools-core.md) ^0.7.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2023-06-21
- 0.3.1 — 2023-04-05
- 0.3.0 — 2023-03-27
- 0.2.0 — 2023-02-27
- 0.1.2 — 2022-11-04
- 0.1.1 — 2022-07-29
- 0.1.0 — 2022-07-29

## README

# @fresha/har-extract

Contains CLI utilities for working with HAR files.

## Installation

```bash
npm install @fresha/har-extract
```

## fresha-har-extract

This command parses HAR files and extracts structure of JSON:API requests and responses.
The output is written in tree-like form to specified file.

```bash
npx fresha-har-extract file1.har file2.har ... -o structure.json
```

Output data is structured as a 2-level map:

```json5
{
  "www.example.com": {
    "/path1": [
      {
        "url": {
          "host": "www.example.com",
          "pathname": "/path1",
          "searchParams": [
            "p1",
            "p2"
          ]
        },
        "request": null,
        "response": {
          // high-level representation of JSON:API response document
          // we're mostly interested in resource types here, because
          // exact response structure is defined by resources themselves
          "data": "resource-type",
          "included": [
            "included-type",
          ],
        },
      },
    ],
    "path2": [
      // entries for /path2
    ]
  },
  "another.example.com": {
    // map of entries for this host
  },
}
```

In the future, this command will be extended to support plain JSON payloads, as well as host/path
filtering.

---
_Source: https://npm.io/package/@fresha/har-extract · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
