Back to Wirefolio · User guide
Node.js 24 is suitable for the current dependencies. Install the dependencies and Playwright Chromium binary:
npm ci
npx playwright install chromium
npm testThe suite runs Vitest, type-checks and builds the extension, then runs Playwright against the unpacked build and a loopback fixture server. The cURL and Python round-trip tests depend on the relevant executables. Python HTTP round trips use the installed packages among requests, httpx, and aiohttp.
| Command | What it does |
|---|---|
npm run dev |
Watches changes and rebuilds dist/. Reload the extension in Chrome after changes. |
npm run lint |
Type-checks the project. |
npm run build |
Type-checks and builds into dist/. |
npm run test:unit |
Runs unit tests and available code-generation round trips. |
npm run test:e2e |
Tests the built extension in Chromium. Build first. |
Set the HEADED environment variable to 1 to watch the browser tests. In PowerShell, use $env:HEADED = '1'.
| Directory | Responsibility |
|---|---|
src/background |
Manifest V3 worker, debugger sessions, recording, interception, and pins. |
src/core |
Request types, messages, memory limits, rule matching, CDP payloads, HAR, and code generation. |
src/ui |
React side panel and pop-out, virtualized request list, details, editor, and previews. |
public |
Manifest and icons copied to the build. |
tests |
Vitest unit tests and Chromium tests backed by a loopback fixture. |
The worker translates Chrome’s Network.* events into captured rows. The UI receives metadata for the list and available bodies when you inspect a selected entry. The worker handles interception through Fetch.* events.
| Operation | CDP call |
|---|---|
| Continue or edit a request | Fetch.continueRequest |
| Continue a response with status or header edits | Fetch.continueResponse |
| Replace a response body | Fetch.fulfillRequest |
| Block a held request | Fetch.failRequest |
Request header edits replace the captured list. Wirefolio strips pseudo-headers and clears stale length and encoding headers when updating a body. For a replacement response body, it sends decoded bytes, clears the original transfer and content encodings, and recalculates length. Chrome DevTools Protocol
- Align the versions in
package.json, the project entries inpackage-lock.json, andpublic/manifest.json. - Run
npm testfrom a clean checkout and check the production build. - ZIP the contents of
dist/withmanifest.jsonat the archive root. Includebackground.js,sidepanel.html,THIRD-PARTY-LICENSES.md, assets, and icons. Source maps are optional. - Load the extracted package in a clean Chrome profile and record a request against a local app.
- Tag that commit as
v<version>and attach the Chrome ZIP to a GitHub release. GitHub’s generated source archives are for reviewing source. Install the separately attached Chrome ZIP.