Skip to content

Commit cae2306

Browse files
committed
fixup har recording
1 parent e26be70 commit cae2306

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

browser-extension/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ We maintain a corpus of test pages in two formats for testing the browser extens
8484
- `npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
8585
- login manually, then close the browser
8686
- ***these cookies are very sensitive! we only run this script using a test account that has no permissions or memberships to anything, recommend you do the same!***
87-
- `pnpm run corpus:record:har` records new HAR files using those auth tokens (it needs args, run it with no args for docs)
87+
- `pnpm run corpus:har:record` records new HAR files using those auth tokens (it needs args, run it with no args for docs)
8888
- DO NOT COMMIT AND PUSH NEW OR CHANGED HAR files!
89-
- we try to sanitize these (see `har-record.ts` for details) but there may be important PII in them
89+
- we try to sanitize these (see `corpus-har-record.ts` for details) but there may be important PII in them
9090
- if you need new HAR files for something, let us know and we will generate them ourselves using a dummy account
9191
- IF YOUR PR CHANGES OR ADDS HAR FILES WE WILL CLOSE IT. Ask for HAR files and we'll be happy to generate clean ones you can test against.
9292

browser-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"test": "vitest run",
6363
"playground": "vite --config vite.playground.config.ts",
6464
"playground:build": "vite build --config vite.playground.config.ts",
65-
"corpus:record:har": "tsx tests/har-record.ts",
65+
"corpus:har:record": "tsx tests/corpus-har-record.ts",
6666
"corpus:view": "tsx tests/corpus-view.ts"
6767
},
6868
"type": "module",

browser-extension/tests/har-record.ts renamed to browser-extension/tests/corpus-har-record.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function stripHeaders(headers?: any[]) {
6565
async function sanitize(filename: string) {
6666
console.log('Sanitizing:', filename)
6767

68-
const p = path.join('tests/corpus/har', filename)
68+
const p = path.join('tests/corpus', filename)
6969
const har = JSON.parse(await fs.readFile(p, 'utf8'))
7070

7171
for (const e of har.log?.entries ?? []) {
@@ -84,7 +84,7 @@ async function sanitize(filename: string) {
8484
await fs.writeFile(p, JSON.stringify(har, null, 2))
8585
}
8686

87-
;(async () => {
87+
; (async () => {
8888
const pattern = process.argv[2]
8989

9090
// If no argument provided, show available keys

0 commit comments

Comments
 (0)