@mendable/firecrawl 4.13.2 → 4.14.1
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/{chunk-YMCI3PLP.js → chunk-SQ7TKRDD.js} +3 -2
- package/dist/index.cjs +5 -3
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -3
- package/dist/{package-HWPUIS3T.js → package-4AWSLMAK.js} +1 -1
- package/package.json +1 -1
- package/src/v2/client.ts +1 -1
- package/src/v2/methods/browser.ts +5 -0
- package/src/v2/types.ts +1 -1
|
@@ -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.
|
|
11
|
+
version: "4.14.1",
|
|
12
12
|
description: "JavaScript SDK for Firecrawl API",
|
|
13
13
|
main: "dist/index.js",
|
|
14
14
|
types: "dist/index.d.ts",
|
|
@@ -72,7 +72,8 @@ var require_package = __commonJS({
|
|
|
72
72
|
pnpm: {
|
|
73
73
|
overrides: {
|
|
74
74
|
"@isaacs/brace-expansion@<=5.0.0": ">=5.0.1",
|
|
75
|
-
"minimatch@<10.2.1": ">=10.2.1"
|
|
75
|
+
"minimatch@<10.2.1": ">=10.2.1",
|
|
76
|
+
"rollup@<4.59.0": ">=4.59.0"
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
};
|
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.
|
|
38
|
+
version: "4.14.1",
|
|
39
39
|
description: "JavaScript SDK for Firecrawl API",
|
|
40
40
|
main: "dist/index.js",
|
|
41
41
|
types: "dist/index.d.ts",
|
|
@@ -99,7 +99,8 @@ var require_package = __commonJS({
|
|
|
99
99
|
pnpm: {
|
|
100
100
|
overrides: {
|
|
101
101
|
"@isaacs/brace-expansion@<=5.0.0": ">=5.0.1",
|
|
102
|
-
"minimatch@<10.2.1": ">=10.2.1"
|
|
102
|
+
"minimatch@<10.2.1": ">=10.2.1",
|
|
103
|
+
"rollup@<4.59.0": ">=4.59.0"
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
};
|
|
@@ -937,6 +938,7 @@ async function browser(http, args = {}) {
|
|
|
937
938
|
if (args.ttl != null) body.ttl = args.ttl;
|
|
938
939
|
if (args.activityTtl != null) body.activityTtl = args.activityTtl;
|
|
939
940
|
if (args.streamWebView != null) body.streamWebView = args.streamWebView;
|
|
941
|
+
if (args.profile != null) body.profile = args.profile;
|
|
940
942
|
try {
|
|
941
943
|
const res = await http.post("/v2/browser", body);
|
|
942
944
|
if (res.status !== 200) throwForBadResponse(res, "create browser session");
|
|
@@ -1491,7 +1493,7 @@ var FirecrawlClient = class {
|
|
|
1491
1493
|
// Browser
|
|
1492
1494
|
/**
|
|
1493
1495
|
* Create a new browser session.
|
|
1494
|
-
* @param args Session options (ttl, activityTtl, streamWebView).
|
|
1496
|
+
* @param args Session options (ttl, activityTtl, streamWebView, profile).
|
|
1495
1497
|
* @returns Session id, CDP URL, live view URL, and expiration time.
|
|
1496
1498
|
*/
|
|
1497
1499
|
async browser(args = {}) {
|
package/dist/index.d.cts
CHANGED
|
@@ -101,6 +101,7 @@ interface ScrapeOptions {
|
|
|
101
101
|
mobile?: boolean;
|
|
102
102
|
parsers?: Array<string | {
|
|
103
103
|
type: 'pdf';
|
|
104
|
+
mode?: 'fast' | 'auto' | 'ocr';
|
|
104
105
|
maxPages?: number;
|
|
105
106
|
}>;
|
|
106
107
|
actions?: ActionOption[];
|
|
@@ -653,6 +654,10 @@ declare function browser(http: HttpClient, args?: {
|
|
|
653
654
|
ttl?: number;
|
|
654
655
|
activityTtl?: number;
|
|
655
656
|
streamWebView?: boolean;
|
|
657
|
+
profile?: {
|
|
658
|
+
name: string;
|
|
659
|
+
writeMode?: "readonly" | "readwrite";
|
|
660
|
+
};
|
|
656
661
|
}): Promise<BrowserCreateResponse>;
|
|
657
662
|
declare function browserExecute(http: HttpClient, sessionId: string, args: {
|
|
658
663
|
code: string;
|
|
@@ -876,7 +881,7 @@ declare class FirecrawlClient {
|
|
|
876
881
|
cancelAgent(jobId: string): Promise<boolean>;
|
|
877
882
|
/**
|
|
878
883
|
* Create a new browser session.
|
|
879
|
-
* @param args Session options (ttl, activityTtl, streamWebView).
|
|
884
|
+
* @param args Session options (ttl, activityTtl, streamWebView, profile).
|
|
880
885
|
* @returns Session id, CDP URL, live view URL, and expiration time.
|
|
881
886
|
*/
|
|
882
887
|
browser(args?: Parameters<typeof browser>[1]): Promise<BrowserCreateResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ interface ScrapeOptions {
|
|
|
101
101
|
mobile?: boolean;
|
|
102
102
|
parsers?: Array<string | {
|
|
103
103
|
type: 'pdf';
|
|
104
|
+
mode?: 'fast' | 'auto' | 'ocr';
|
|
104
105
|
maxPages?: number;
|
|
105
106
|
}>;
|
|
106
107
|
actions?: ActionOption[];
|
|
@@ -653,6 +654,10 @@ declare function browser(http: HttpClient, args?: {
|
|
|
653
654
|
ttl?: number;
|
|
654
655
|
activityTtl?: number;
|
|
655
656
|
streamWebView?: boolean;
|
|
657
|
+
profile?: {
|
|
658
|
+
name: string;
|
|
659
|
+
writeMode?: "readonly" | "readwrite";
|
|
660
|
+
};
|
|
656
661
|
}): Promise<BrowserCreateResponse>;
|
|
657
662
|
declare function browserExecute(http: HttpClient, sessionId: string, args: {
|
|
658
663
|
code: string;
|
|
@@ -876,7 +881,7 @@ declare class FirecrawlClient {
|
|
|
876
881
|
cancelAgent(jobId: string): Promise<boolean>;
|
|
877
882
|
/**
|
|
878
883
|
* Create a new browser session.
|
|
879
|
-
* @param args Session options (ttl, activityTtl, streamWebView).
|
|
884
|
+
* @param args Session options (ttl, activityTtl, streamWebView, profile).
|
|
880
885
|
* @returns Session id, CDP URL, live view URL, and expiration time.
|
|
881
886
|
*/
|
|
882
887
|
browser(args?: Parameters<typeof browser>[1]): Promise<BrowserCreateResponse>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_package
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SQ7TKRDD.js";
|
|
4
4
|
|
|
5
5
|
// src/v2/utils/httpClient.ts
|
|
6
6
|
import axios from "axios";
|
|
@@ -820,6 +820,7 @@ async function browser(http, args = {}) {
|
|
|
820
820
|
if (args.ttl != null) body.ttl = args.ttl;
|
|
821
821
|
if (args.activityTtl != null) body.activityTtl = args.activityTtl;
|
|
822
822
|
if (args.streamWebView != null) body.streamWebView = args.streamWebView;
|
|
823
|
+
if (args.profile != null) body.profile = args.profile;
|
|
823
824
|
try {
|
|
824
825
|
const res = await http.post("/v2/browser", body);
|
|
825
826
|
if (res.status !== 200) throwForBadResponse(res, "create browser session");
|
|
@@ -1374,7 +1375,7 @@ var FirecrawlClient = class {
|
|
|
1374
1375
|
// Browser
|
|
1375
1376
|
/**
|
|
1376
1377
|
* Create a new browser session.
|
|
1377
|
-
* @param args Session options (ttl, activityTtl, streamWebView).
|
|
1378
|
+
* @param args Session options (ttl, activityTtl, streamWebView, profile).
|
|
1378
1379
|
* @returns Session id, CDP URL, live view URL, and expiration time.
|
|
1379
1380
|
*/
|
|
1380
1381
|
async browser(args = {}) {
|
|
@@ -1473,7 +1474,7 @@ var FirecrawlApp = class {
|
|
|
1473
1474
|
if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
|
|
1474
1475
|
return process.env.npm_package_version;
|
|
1475
1476
|
}
|
|
1476
|
-
const packageJson = await import("./package-
|
|
1477
|
+
const packageJson = await import("./package-4AWSLMAK.js");
|
|
1477
1478
|
return packageJson.default.version;
|
|
1478
1479
|
} catch (error) {
|
|
1479
1480
|
const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
|
package/package.json
CHANGED
package/src/v2/client.ts
CHANGED
|
@@ -317,7 +317,7 @@ export class FirecrawlClient {
|
|
|
317
317
|
// Browser
|
|
318
318
|
/**
|
|
319
319
|
* Create a new browser session.
|
|
320
|
-
* @param args Session options (ttl, activityTtl, streamWebView).
|
|
320
|
+
* @param args Session options (ttl, activityTtl, streamWebView, profile).
|
|
321
321
|
* @returns Session id, CDP URL, live view URL, and expiration time.
|
|
322
322
|
*/
|
|
323
323
|
async browser(
|
|
@@ -13,12 +13,17 @@ export async function browser(
|
|
|
13
13
|
ttl?: number;
|
|
14
14
|
activityTtl?: number;
|
|
15
15
|
streamWebView?: boolean;
|
|
16
|
+
profile?: {
|
|
17
|
+
name: string;
|
|
18
|
+
writeMode?: "readonly" | "readwrite";
|
|
19
|
+
};
|
|
16
20
|
} = {}
|
|
17
21
|
): Promise<BrowserCreateResponse> {
|
|
18
22
|
const body: Record<string, unknown> = {};
|
|
19
23
|
if (args.ttl != null) body.ttl = args.ttl;
|
|
20
24
|
if (args.activityTtl != null) body.activityTtl = args.activityTtl;
|
|
21
25
|
if (args.streamWebView != null) body.streamWebView = args.streamWebView;
|
|
26
|
+
if (args.profile != null) body.profile = args.profile;
|
|
22
27
|
|
|
23
28
|
try {
|
|
24
29
|
const res = await http.post<BrowserCreateResponse>("/v2/browser", body);
|
package/src/v2/types.ts
CHANGED
|
@@ -145,7 +145,7 @@ export interface ScrapeOptions {
|
|
|
145
145
|
timeout?: number;
|
|
146
146
|
waitFor?: number;
|
|
147
147
|
mobile?: boolean;
|
|
148
|
-
parsers?: Array<string | { type: 'pdf'; maxPages?: number }>;
|
|
148
|
+
parsers?: Array<string | { type: 'pdf'; mode?: 'fast' | 'auto' | 'ocr'; maxPages?: number }>;
|
|
149
149
|
actions?: ActionOption[];
|
|
150
150
|
location?: LocationConfig;
|
|
151
151
|
skipTlsVerification?: boolean;
|