@mendable/firecrawl-js 1.18.3-beta.1 → 1.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/index.ts +7 -2
package/dist/index.cjs
CHANGED
|
@@ -111,7 +111,7 @@ var FirecrawlApp = class {
|
|
|
111
111
|
const response = await import_axios.default.post(
|
|
112
112
|
this.apiUrl + `/v1/scrape`,
|
|
113
113
|
jsonData,
|
|
114
|
-
{ headers }
|
|
114
|
+
{ headers, timeout: params?.timeout !== void 0 ? params.timeout + 5e3 : void 0 }
|
|
115
115
|
);
|
|
116
116
|
if (response.status === 200) {
|
|
117
117
|
const responseData = response.data;
|
|
@@ -742,7 +742,7 @@ var FirecrawlApp = class {
|
|
|
742
742
|
* @returns The response from the POST request.
|
|
743
743
|
*/
|
|
744
744
|
postRequest(url, data, headers) {
|
|
745
|
-
return import_axios.default.post(url, data, { headers });
|
|
745
|
+
return import_axios.default.post(url, data, { headers, timeout: data?.timeout ? data.timeout + 5e3 : void 0 });
|
|
746
746
|
}
|
|
747
747
|
/**
|
|
748
748
|
* Sends a GET request to the specified URL.
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ var FirecrawlApp = class {
|
|
|
75
75
|
const response = await axios.post(
|
|
76
76
|
this.apiUrl + `/v1/scrape`,
|
|
77
77
|
jsonData,
|
|
78
|
-
{ headers }
|
|
78
|
+
{ headers, timeout: params?.timeout !== void 0 ? params.timeout + 5e3 : void 0 }
|
|
79
79
|
);
|
|
80
80
|
if (response.status === 200) {
|
|
81
81
|
const responseData = response.data;
|
|
@@ -706,7 +706,7 @@ var FirecrawlApp = class {
|
|
|
706
706
|
* @returns The response from the POST request.
|
|
707
707
|
*/
|
|
708
708
|
postRequest(url, data, headers) {
|
|
709
|
-
return axios.post(url, data, { headers });
|
|
709
|
+
return axios.post(url, data, { headers, timeout: data?.timeout ? data.timeout + 5e3 : void 0 });
|
|
710
710
|
}
|
|
711
711
|
/**
|
|
712
712
|
* Sends a GET request to the specified URL.
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -364,6 +364,11 @@ export interface DeepResearchParams {
|
|
|
364
364
|
* @default 270
|
|
365
365
|
*/
|
|
366
366
|
timeLimit?: number;
|
|
367
|
+
/**
|
|
368
|
+
* Maximum number of URLs to analyze (1-1000)
|
|
369
|
+
* @default 20
|
|
370
|
+
*/
|
|
371
|
+
maxUrls?: number;
|
|
367
372
|
/**
|
|
368
373
|
* Experimental flag for streaming steps
|
|
369
374
|
*/
|
|
@@ -535,7 +540,7 @@ export default class FirecrawlApp {
|
|
|
535
540
|
const response: AxiosResponse = await axios.post(
|
|
536
541
|
this.apiUrl + `/v1/scrape`,
|
|
537
542
|
jsonData,
|
|
538
|
-
{ headers }
|
|
543
|
+
{ headers, timeout: params?.timeout !== undefined ? (params.timeout + 5000) : undefined },
|
|
539
544
|
);
|
|
540
545
|
if (response.status === 200) {
|
|
541
546
|
const responseData = response.data;
|
|
@@ -1262,7 +1267,7 @@ export default class FirecrawlApp {
|
|
|
1262
1267
|
data: any,
|
|
1263
1268
|
headers: AxiosRequestHeaders
|
|
1264
1269
|
): Promise<AxiosResponse> {
|
|
1265
|
-
return axios.post(url, data, { headers });
|
|
1270
|
+
return axios.post(url, data, { headers, timeout: (data?.timeout ? (data.timeout + 5000) : undefined) });
|
|
1266
1271
|
}
|
|
1267
1272
|
|
|
1268
1273
|
/**
|