firecrawl 4.3.6 → 4.3.7
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.
|
@@ -8,7 +8,7 @@ var require_package = __commonJS({
|
|
|
8
8
|
"package.json"(exports, module) {
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@mendable/firecrawl-js",
|
|
11
|
-
version: "4.3.
|
|
11
|
+
version: "4.3.7",
|
|
12
12
|
description: "JavaScript SDK for Firecrawl API",
|
|
13
13
|
main: "dist/index.js",
|
|
14
14
|
types: "dist/index.d.ts",
|
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: "@mendable/firecrawl-js",
|
|
38
|
-
version: "4.3.
|
|
38
|
+
version: "4.3.7",
|
|
39
39
|
description: "JavaScript SDK for Firecrawl API",
|
|
40
40
|
main: "dist/index.js",
|
|
41
41
|
types: "dist/index.d.ts",
|
|
@@ -174,6 +174,9 @@ var HttpClient = class {
|
|
|
174
174
|
if (cfg.method && ["post", "put", "patch"].includes(cfg.method.toLowerCase())) {
|
|
175
175
|
const data = cfg.data ?? {};
|
|
176
176
|
cfg.data = { ...data, origin: typeof data.origin === "string" && data.origin.includes("mcp") ? data.origin : `js-sdk@${version}` };
|
|
177
|
+
if (typeof data.timeout === "number") {
|
|
178
|
+
cfg.timeout = data.timeout + 5e3;
|
|
179
|
+
}
|
|
177
180
|
}
|
|
178
181
|
const res = await this.instance.request(cfg);
|
|
179
182
|
if (res.status === 502 && attempt < this.maxRetries - 1) {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_package
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VMAQHKH3.js";
|
|
4
4
|
|
|
5
5
|
// src/v2/utils/httpClient.ts
|
|
6
6
|
import axios from "axios";
|
|
@@ -58,6 +58,9 @@ var HttpClient = class {
|
|
|
58
58
|
if (cfg.method && ["post", "put", "patch"].includes(cfg.method.toLowerCase())) {
|
|
59
59
|
const data = cfg.data ?? {};
|
|
60
60
|
cfg.data = { ...data, origin: typeof data.origin === "string" && data.origin.includes("mcp") ? data.origin : `js-sdk@${version}` };
|
|
61
|
+
if (typeof data.timeout === "number") {
|
|
62
|
+
cfg.timeout = data.timeout + 5e3;
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
const res = await this.instance.request(cfg);
|
|
63
66
|
if (res.status === 502 && attempt < this.maxRetries - 1) {
|
|
@@ -1065,7 +1068,7 @@ var FirecrawlApp = class {
|
|
|
1065
1068
|
if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
|
|
1066
1069
|
return process.env.npm_package_version;
|
|
1067
1070
|
}
|
|
1068
|
-
const packageJson = await import("./package-
|
|
1071
|
+
const packageJson = await import("./package-XWA4UHUW.js");
|
|
1069
1072
|
return packageJson.default.version;
|
|
1070
1073
|
} catch (error) {
|
|
1071
1074
|
const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
|
package/package.json
CHANGED
|
@@ -54,6 +54,11 @@ export class HttpClient {
|
|
|
54
54
|
if (cfg.method && ["post", "put", "patch"].includes(cfg.method.toLowerCase())) {
|
|
55
55
|
const data = (cfg.data ?? {}) as Record<string, unknown>;
|
|
56
56
|
cfg.data = { ...data, origin: typeof data.origin === "string" && data.origin.includes("mcp") ? data.origin : `js-sdk@${version}` };
|
|
57
|
+
|
|
58
|
+
// If timeout is specified in the body, use it to override the request timeout
|
|
59
|
+
if (typeof data.timeout === "number") {
|
|
60
|
+
cfg.timeout = data.timeout + 5000;
|
|
61
|
+
}
|
|
57
62
|
}
|
|
58
63
|
const res = await this.instance.request<T>(cfg);
|
|
59
64
|
if (res.status === 502 && attempt < this.maxRetries - 1) {
|