File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * HAR Page Viewer Test Server
3+ *
4+ * This Express server serves recorded HAR files as live web pages for testing.
5+ * It provides two viewing modes: 'clean' (original page) and 'gitcasso' (with extension injected).
6+ *
7+ * Key components:
8+ * - Loads HAR files from ./har/ directory based on PAGES index in `./har/_har_index.ts`
9+ * - Patches URLs in HTML to serve assets locally from HAR data
10+ * - Handles asset serving by matching HAR entries to requested paths
11+ *
12+ * Development notes:
13+ * - Injects Gitcasso content script in 'gitcasso' mode with location patching
14+ * - Location patching uses history.pushState to simulate original URLs
15+ * - Chrome APIs are mocked for extension testing outside browser context
16+ * - Content script is fetched from http://localhost:3000 (dev server)
17+ */
118import { error } from 'node:console'
219import fs from 'node:fs/promises'
320import path from 'node:path'
You can’t perform that action at this time.
0 commit comments