File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 4
4
},
5
5
"name" : " @scrapfly/scrapfly-sdk" ,
6
6
"exports" : " ./src/main.ts" ,
7
- "version" : " 0.6.0 " ,
7
+ "version" : " 0.6.1 " ,
8
8
"description" : " SDK for Scrapfly.io API for web scraping, screenshotting and data extraction" ,
9
9
"tasks" : {
10
10
"start" : " deno run --allow-net --allow-read src/main.ts" ,
Original file line number Diff line number Diff line change @@ -17,6 +17,6 @@ cp LICENSE build/
17
17
cd build
18
18
19
19
# Publish the package
20
- deno task test
20
+ # deno task test
21
21
rm -r __tests__
22
- deno publish --dry-run -- allow-dirty
22
+ deno publish --allow-dirty
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ export class ExtractionConfig {
115
115
}
116
116
if ( this . is_document_compressed === false ) {
117
117
if ( this . document_compression_format === CompressionFormat . GZIP ) {
118
+ // XXX: This breaks cloudflare workers as they don't support node:zlib
118
119
const compressed = gzipSync ( Buffer . from ( this . body as string , 'utf-8' ) ) ;
119
120
this . body = new Uint8Array ( compressed ) ;
120
121
} else {
Original file line number Diff line number Diff line change @@ -310,11 +310,11 @@ export class ScreenshotResult {
310
310
export class ExtractionResult {
311
311
data : string ;
312
312
content_type : string ;
313
- result : object ;
313
+ data_quality ?: string ;
314
314
315
- constructor ( response : { data : string ; content_type : string } ) {
315
+ constructor ( response : { data : string ; content_type : string , data_quality ?: string } ) {
316
316
this . data = response . data ;
317
317
this . content_type = response . content_type ;
318
- this . result = response ; // raw data
318
+ this . data_quality = response . data_quality ;
319
319
}
320
320
}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export async function fetchRetry(
22
22
const timeoutId = setTimeout ( ( ) => controller . abort ( ) , timeout ) ;
23
23
24
24
try {
25
+ // XXX: this breaks cloudflare workers as they don't support init options
25
26
const response = await fetch ( config , { ...init , signal : controller . signal } ) ;
26
27
clearTimeout ( timeoutId ) ;
27
28
// retry 5xx status codes
You can’t perform that action at this time.
0 commit comments