refactor(http-recorder): hide cassette format behind Cassette seam (#26725)

This commit is contained in:
Kit Langton 2026-05-10 12:29:55 -04:00 committed by GitHub
commit 2bd3d9a696
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 224 additions and 230 deletions

View file

@ -52,9 +52,10 @@ export const isHttpInteraction = InteractionSchema.guards.http
export const isWebSocketInteraction = InteractionSchema.guards.websocket
export const httpInteractions = (cassette: Cassette) => cassette.interactions.filter(isHttpInteraction)
export const httpInteractions = (interactions: ReadonlyArray<Interaction>) => interactions.filter(isHttpInteraction)
export const webSocketInteractions = (cassette: Cassette) => cassette.interactions.filter(isWebSocketInteraction)
export const webSocketInteractions = (interactions: ReadonlyArray<Interaction>) =>
interactions.filter(isWebSocketInteraction)
export const CassetteSchema = Schema.Struct({
version: Schema.Literal(1),