refactor(http-recorder): tighten cassette safety, fix WS leaks + docs (#26730)

This commit is contained in:
Kit Langton 2026-05-14 14:03:22 -04:00 committed by GitHub
commit b4fc5ef071
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 177 additions and 95 deletions

View file

@ -36,7 +36,7 @@ export const canonicalSnapshot = (snapshot: RequestSnapshot): string =>
export const defaultMatcher: RequestMatcher = (incoming, recorded) =>
canonicalSnapshot(incoming) === canonicalSnapshot(recorded)
const safeText = (value: unknown) => {
export const safeText = (value: unknown) => {
if (value === undefined) return "undefined"
if (secretFindings(value).length > 0) return JSON.stringify(REDACTED)
const text = JSON.stringify(value)