0.4.0 • Published 11 months ago

@fresha/har-extract v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@fresha/har-extract

Contains CLI utilities for working with HAR files.

Installation

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.

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

Output data is structured as a 2-level map:

{
  "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.

0.4.0

11 months ago

0.3.0

1 year ago

0.3.1

1 year ago

0.2.0

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago