firecrawl 1.25.0 → 1.25.2
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 +9 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/{package-5F6D6QMY.js → package-X2DYWE74.js} +1 -1
- package/package.json +1 -1
- package/src/index.ts +10 -3
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ var require_package = __commonJS({
|
|
|
35
35
|
"package.json"(exports2, module2) {
|
|
36
36
|
module2.exports = {
|
|
37
37
|
name: "firecrawl",
|
|
38
|
-
version: "1.25.
|
|
38
|
+
version: "1.25.2",
|
|
39
39
|
description: "JavaScript SDK for Firecrawl API",
|
|
40
40
|
main: "dist/index.js",
|
|
41
41
|
types: "dist/index.d.ts",
|
|
@@ -132,7 +132,7 @@ var FirecrawlError = class extends Error {
|
|
|
132
132
|
var FirecrawlApp = class {
|
|
133
133
|
apiKey;
|
|
134
134
|
apiUrl;
|
|
135
|
-
version = "1.
|
|
135
|
+
version = "1.25.1";
|
|
136
136
|
isCloudService(url) {
|
|
137
137
|
return url.includes("api.firecrawl.dev");
|
|
138
138
|
}
|
|
@@ -142,7 +142,7 @@ var FirecrawlApp = class {
|
|
|
142
142
|
return packageJson.default.version;
|
|
143
143
|
} catch (error) {
|
|
144
144
|
console.error("Error getting version:", error);
|
|
145
|
-
return "1.
|
|
145
|
+
return "1.25.1";
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
async init() {
|
|
@@ -936,6 +936,12 @@ var FirecrawlApp = class {
|
|
|
936
936
|
* @param {string} action - The action being performed when the error occurred.
|
|
937
937
|
*/
|
|
938
938
|
handleError(response, action) {
|
|
939
|
+
if (!response) {
|
|
940
|
+
throw new FirecrawlError(
|
|
941
|
+
`No response received while trying to ${action}. This may be a network error or the server is unreachable.`,
|
|
942
|
+
0
|
|
943
|
+
);
|
|
944
|
+
}
|
|
939
945
|
if ([400, 402, 403, 408, 409, 500].includes(response.status)) {
|
|
940
946
|
const errorMessage = response.data.error || "Unknown error occurred";
|
|
941
947
|
const details = response.data.details ? ` - ${JSON.stringify(response.data.details)}` : "";
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,17 +23,17 @@ var FirecrawlError = class extends Error {
|
|
|
23
23
|
var FirecrawlApp = class {
|
|
24
24
|
apiKey;
|
|
25
25
|
apiUrl;
|
|
26
|
-
version = "1.
|
|
26
|
+
version = "1.25.1";
|
|
27
27
|
isCloudService(url) {
|
|
28
28
|
return url.includes("api.firecrawl.dev");
|
|
29
29
|
}
|
|
30
30
|
async getVersion() {
|
|
31
31
|
try {
|
|
32
|
-
const packageJson = await import("./package-
|
|
32
|
+
const packageJson = await import("./package-X2DYWE74.js");
|
|
33
33
|
return packageJson.default.version;
|
|
34
34
|
} catch (error) {
|
|
35
35
|
console.error("Error getting version:", error);
|
|
36
|
-
return "1.
|
|
36
|
+
return "1.25.1";
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
async init() {
|
|
@@ -827,6 +827,12 @@ var FirecrawlApp = class {
|
|
|
827
827
|
* @param {string} action - The action being performed when the error occurred.
|
|
828
828
|
*/
|
|
829
829
|
handleError(response, action) {
|
|
830
|
+
if (!response) {
|
|
831
|
+
throw new FirecrawlError(
|
|
832
|
+
`No response received while trying to ${action}. This may be a network error or the server is unreachable.`,
|
|
833
|
+
0
|
|
834
|
+
);
|
|
835
|
+
}
|
|
830
836
|
if ([400, 402, 403, 408, 409, 500].includes(response.status)) {
|
|
831
837
|
const errorMessage = response.data.error || "Unknown error occurred";
|
|
832
838
|
const details = response.data.details ? ` - ${JSON.stringify(response.data.details)}` : "";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -119,7 +119,7 @@ export interface CrawlScrapeOptions {
|
|
|
119
119
|
skipTlsVerification?: boolean;
|
|
120
120
|
removeBase64Images?: boolean;
|
|
121
121
|
blockAds?: boolean;
|
|
122
|
-
proxy?: "basic" | "stealth";
|
|
122
|
+
proxy?: "basic" | "stealth" | "auto";
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export type Action = {
|
|
@@ -560,7 +560,7 @@ export interface GenerateLLMsTextStatusResponse {
|
|
|
560
560
|
export default class FirecrawlApp {
|
|
561
561
|
public apiKey: string;
|
|
562
562
|
public apiUrl: string;
|
|
563
|
-
public version: string =
|
|
563
|
+
public version: string = "1.25.1";
|
|
564
564
|
|
|
565
565
|
private isCloudService(url: string): boolean {
|
|
566
566
|
return url.includes('api.firecrawl.dev');
|
|
@@ -572,7 +572,7 @@ export default class FirecrawlApp {
|
|
|
572
572
|
return packageJson.default.version;
|
|
573
573
|
} catch (error) {
|
|
574
574
|
console.error("Error getting version:", error);
|
|
575
|
-
return
|
|
575
|
+
return "1.25.1";
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
|
|
@@ -1491,6 +1491,13 @@ export default class FirecrawlApp {
|
|
|
1491
1491
|
* @param {string} action - The action being performed when the error occurred.
|
|
1492
1492
|
*/
|
|
1493
1493
|
handleError(response: AxiosResponse, action: string): void {
|
|
1494
|
+
if (!response) {
|
|
1495
|
+
throw new FirecrawlError(
|
|
1496
|
+
`No response received while trying to ${action}. This may be a network error or the server is unreachable.`,
|
|
1497
|
+
0
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1494
1501
|
if ([400, 402, 403, 408, 409, 500].includes(response.status)) {
|
|
1495
1502
|
const errorMessage: string =
|
|
1496
1503
|
response.data.error || "Unknown error occurred";
|