File tree Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import { base64FromBytes } from "../src/utils/base64FromBytes" ;
2
1
import { isBackend , isFrontend } from "../src/utils/env-predicates" ;
3
2
import { omit } from "../src/utils/omit" ;
4
3
@@ -145,13 +144,13 @@ async function vcr(
145
144
method : init . method ,
146
145
} ,
147
146
response : {
148
- // Truncating the body to 30KB to avoid having huge files
149
- body :
150
- arrayBuffer . byteLength > 30_000
151
- ? ""
152
- : isText
153
- ? new TextDecoder ( ) . decode ( arrayBuffer )
154
- : BASE64_PREFIX + base64FromBytes ( new Uint8Array ( arrayBuffer ) ) ,
147
+ body : isText ? new TextDecoder ( ) . decode ( arrayBuffer ) : "" ,
148
+ // // Alternative to also save binary data :
149
+ // arrayBuffer.byteLength > 30_000
150
+ // ? ""
151
+ // : isText
152
+ // ? new TextDecoder().decode(arrayBuffer)
153
+ // : BASE64_PREFIX + base64FromBytes(new Uint8Array(arrayBuffer)),
155
154
status : response . status ,
156
155
statusText : response . statusText ,
157
156
headers : Object . fromEntries (
You can’t perform that action at this time.
0 commit comments