@mendable/firecrawl 4.3.1 → 4.3.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/{chunk-VFP5PS5Z.js → chunk-QYSKXMMY.js} +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +13 -7
- package/dist/index.d.ts +13 -7
- package/dist/index.js +3 -2
- package/dist/{package-ZQ5CJHCA.js → package-F2DQUYTW.js} +1 -1
- package/package.json +1 -1
- package/src/v1/index.ts +10 -4
- package/src/v2/methods/map.ts +1 -0
- package/src/v2/types.ts +1 -0
|
@@ -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.2",
|
|
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.2",
|
|
39
39
|
description: "JavaScript SDK for Firecrawl API",
|
|
40
40
|
main: "dist/index.js",
|
|
41
41
|
types: "dist/index.d.ts",
|
|
@@ -384,6 +384,7 @@ function prepareMapPayload(url, options) {
|
|
|
384
384
|
if (options.includeSubdomains != null) payload.includeSubdomains = options.includeSubdomains;
|
|
385
385
|
if (options.limit != null) payload.limit = options.limit;
|
|
386
386
|
if (options.timeout != null) payload.timeout = options.timeout;
|
|
387
|
+
if (options.location != null) payload.location = options.location;
|
|
387
388
|
}
|
|
388
389
|
return payload;
|
|
389
390
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -41,7 +41,7 @@ interface AttributesFormat extends Format {
|
|
|
41
41
|
}>;
|
|
42
42
|
}
|
|
43
43
|
type FormatOption = FormatString | Format | JsonFormat | ChangeTrackingFormat | ScreenshotFormat | AttributesFormat;
|
|
44
|
-
interface LocationConfig {
|
|
44
|
+
interface LocationConfig$1 {
|
|
45
45
|
country?: string;
|
|
46
46
|
languages?: string[];
|
|
47
47
|
}
|
|
@@ -104,7 +104,7 @@ interface ScrapeOptions {
|
|
|
104
104
|
maxPages?: number;
|
|
105
105
|
}>;
|
|
106
106
|
actions?: ActionOption[];
|
|
107
|
-
location?: LocationConfig;
|
|
107
|
+
location?: LocationConfig$1;
|
|
108
108
|
skipTlsVerification?: boolean;
|
|
109
109
|
removeBase64Images?: boolean;
|
|
110
110
|
fastMode?: boolean;
|
|
@@ -271,6 +271,7 @@ interface MapOptions {
|
|
|
271
271
|
includeSubdomains?: boolean;
|
|
272
272
|
limit?: number;
|
|
273
273
|
timeout?: number;
|
|
274
|
+
location?: LocationConfig$1;
|
|
274
275
|
}
|
|
275
276
|
interface ExtractResponse$1 {
|
|
276
277
|
success?: boolean;
|
|
@@ -687,6 +688,13 @@ interface FirecrawlDocument<T = any, ActionsSchema extends (ActionsResult | neve
|
|
|
687
688
|
title?: string;
|
|
688
689
|
description?: string;
|
|
689
690
|
}
|
|
691
|
+
/**
|
|
692
|
+
* Location configuration for proxy location
|
|
693
|
+
*/
|
|
694
|
+
interface LocationConfig {
|
|
695
|
+
country?: string;
|
|
696
|
+
languages?: string[];
|
|
697
|
+
}
|
|
690
698
|
/**
|
|
691
699
|
* Parameters for scraping operations.
|
|
692
700
|
* Defines the options and configurations available for scraping web content.
|
|
@@ -699,10 +707,7 @@ interface CrawlScrapeOptions {
|
|
|
699
707
|
onlyMainContent?: boolean;
|
|
700
708
|
waitFor?: number;
|
|
701
709
|
timeout?: number;
|
|
702
|
-
location?:
|
|
703
|
-
country?: string;
|
|
704
|
-
languages?: string[];
|
|
705
|
-
};
|
|
710
|
+
location?: LocationConfig;
|
|
706
711
|
mobile?: boolean;
|
|
707
712
|
skipTlsVerification?: boolean;
|
|
708
713
|
removeBase64Images?: boolean;
|
|
@@ -875,6 +880,7 @@ interface MapParams {
|
|
|
875
880
|
limit?: number;
|
|
876
881
|
timeout?: number;
|
|
877
882
|
useIndex?: boolean;
|
|
883
|
+
location?: LocationConfig;
|
|
878
884
|
}
|
|
879
885
|
/**
|
|
880
886
|
* Response interface for mapping operations.
|
|
@@ -1487,4 +1493,4 @@ declare class Firecrawl extends FirecrawlClient {
|
|
|
1487
1493
|
get v1(): FirecrawlApp;
|
|
1488
1494
|
}
|
|
1489
1495
|
|
|
1490
|
-
export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type JsonFormat, type LocationConfig, type MapData, type MapOptions, type PDFAction, type PaginationConfig, type PressAction, type QueueStatusResponse$1 as QueueStatusResponse, type ScrapeAction, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type Viewport, type WaitAction, type WebhookConfig, type WriteAction, Firecrawl as default };
|
|
1496
|
+
export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type JsonFormat, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type PDFAction, type PaginationConfig, type PressAction, type QueueStatusResponse$1 as QueueStatusResponse, type ScrapeAction, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type Viewport, type WaitAction, type WebhookConfig, type WriteAction, Firecrawl as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ interface AttributesFormat extends Format {
|
|
|
41
41
|
}>;
|
|
42
42
|
}
|
|
43
43
|
type FormatOption = FormatString | Format | JsonFormat | ChangeTrackingFormat | ScreenshotFormat | AttributesFormat;
|
|
44
|
-
interface LocationConfig {
|
|
44
|
+
interface LocationConfig$1 {
|
|
45
45
|
country?: string;
|
|
46
46
|
languages?: string[];
|
|
47
47
|
}
|
|
@@ -104,7 +104,7 @@ interface ScrapeOptions {
|
|
|
104
104
|
maxPages?: number;
|
|
105
105
|
}>;
|
|
106
106
|
actions?: ActionOption[];
|
|
107
|
-
location?: LocationConfig;
|
|
107
|
+
location?: LocationConfig$1;
|
|
108
108
|
skipTlsVerification?: boolean;
|
|
109
109
|
removeBase64Images?: boolean;
|
|
110
110
|
fastMode?: boolean;
|
|
@@ -271,6 +271,7 @@ interface MapOptions {
|
|
|
271
271
|
includeSubdomains?: boolean;
|
|
272
272
|
limit?: number;
|
|
273
273
|
timeout?: number;
|
|
274
|
+
location?: LocationConfig$1;
|
|
274
275
|
}
|
|
275
276
|
interface ExtractResponse$1 {
|
|
276
277
|
success?: boolean;
|
|
@@ -687,6 +688,13 @@ interface FirecrawlDocument<T = any, ActionsSchema extends (ActionsResult | neve
|
|
|
687
688
|
title?: string;
|
|
688
689
|
description?: string;
|
|
689
690
|
}
|
|
691
|
+
/**
|
|
692
|
+
* Location configuration for proxy location
|
|
693
|
+
*/
|
|
694
|
+
interface LocationConfig {
|
|
695
|
+
country?: string;
|
|
696
|
+
languages?: string[];
|
|
697
|
+
}
|
|
690
698
|
/**
|
|
691
699
|
* Parameters for scraping operations.
|
|
692
700
|
* Defines the options and configurations available for scraping web content.
|
|
@@ -699,10 +707,7 @@ interface CrawlScrapeOptions {
|
|
|
699
707
|
onlyMainContent?: boolean;
|
|
700
708
|
waitFor?: number;
|
|
701
709
|
timeout?: number;
|
|
702
|
-
location?:
|
|
703
|
-
country?: string;
|
|
704
|
-
languages?: string[];
|
|
705
|
-
};
|
|
710
|
+
location?: LocationConfig;
|
|
706
711
|
mobile?: boolean;
|
|
707
712
|
skipTlsVerification?: boolean;
|
|
708
713
|
removeBase64Images?: boolean;
|
|
@@ -875,6 +880,7 @@ interface MapParams {
|
|
|
875
880
|
limit?: number;
|
|
876
881
|
timeout?: number;
|
|
877
882
|
useIndex?: boolean;
|
|
883
|
+
location?: LocationConfig;
|
|
878
884
|
}
|
|
879
885
|
/**
|
|
880
886
|
* Response interface for mapping operations.
|
|
@@ -1487,4 +1493,4 @@ declare class Firecrawl extends FirecrawlClient {
|
|
|
1487
1493
|
get v1(): FirecrawlApp;
|
|
1488
1494
|
}
|
|
1489
1495
|
|
|
1490
|
-
export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type JsonFormat, type LocationConfig, type MapData, type MapOptions, type PDFAction, type PaginationConfig, type PressAction, type QueueStatusResponse$1 as QueueStatusResponse, type ScrapeAction, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type Viewport, type WaitAction, type WebhookConfig, type WriteAction, Firecrawl as default };
|
|
1496
|
+
export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type JsonFormat, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type PDFAction, type PaginationConfig, type PressAction, type QueueStatusResponse$1 as QueueStatusResponse, type ScrapeAction, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type Viewport, type WaitAction, type WebhookConfig, type WriteAction, Firecrawl as default };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_package
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QYSKXMMY.js";
|
|
4
4
|
|
|
5
5
|
// src/v2/utils/httpClient.ts
|
|
6
6
|
import axios from "axios";
|
|
@@ -268,6 +268,7 @@ function prepareMapPayload(url, options) {
|
|
|
268
268
|
if (options.includeSubdomains != null) payload.includeSubdomains = options.includeSubdomains;
|
|
269
269
|
if (options.limit != null) payload.limit = options.limit;
|
|
270
270
|
if (options.timeout != null) payload.timeout = options.timeout;
|
|
271
|
+
if (options.location != null) payload.location = options.location;
|
|
271
272
|
}
|
|
272
273
|
return payload;
|
|
273
274
|
}
|
|
@@ -1059,7 +1060,7 @@ var FirecrawlApp = class {
|
|
|
1059
1060
|
if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
|
|
1060
1061
|
return process.env.npm_package_version;
|
|
1061
1062
|
}
|
|
1062
|
-
const packageJson = await import("./package-
|
|
1063
|
+
const packageJson = await import("./package-F2DQUYTW.js");
|
|
1063
1064
|
return packageJson.default.version;
|
|
1064
1065
|
} catch (error) {
|
|
1065
1066
|
const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
|
package/package.json
CHANGED
package/src/v1/index.ts
CHANGED
|
@@ -102,6 +102,14 @@ export interface FirecrawlDocument<T = any, ActionsSchema extends (ActionsResult
|
|
|
102
102
|
description?: string;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Location configuration for proxy location
|
|
107
|
+
*/
|
|
108
|
+
export interface LocationConfig {
|
|
109
|
+
country?: string;
|
|
110
|
+
languages?: string[];
|
|
111
|
+
}
|
|
112
|
+
|
|
105
113
|
/**
|
|
106
114
|
* Parameters for scraping operations.
|
|
107
115
|
* Defines the options and configurations available for scraping web content.
|
|
@@ -114,10 +122,7 @@ export interface CrawlScrapeOptions {
|
|
|
114
122
|
onlyMainContent?: boolean;
|
|
115
123
|
waitFor?: number;
|
|
116
124
|
timeout?: number;
|
|
117
|
-
location?:
|
|
118
|
-
country?: string;
|
|
119
|
-
languages?: string[];
|
|
120
|
-
};
|
|
125
|
+
location?: LocationConfig;
|
|
121
126
|
mobile?: boolean;
|
|
122
127
|
skipTlsVerification?: boolean;
|
|
123
128
|
removeBase64Images?: boolean;
|
|
@@ -300,6 +305,7 @@ export interface MapParams {
|
|
|
300
305
|
limit?: number;
|
|
301
306
|
timeout?: number;
|
|
302
307
|
useIndex?: boolean;
|
|
308
|
+
location?: LocationConfig;
|
|
303
309
|
}
|
|
304
310
|
|
|
305
311
|
/**
|
package/src/v2/methods/map.ts
CHANGED
|
@@ -11,6 +11,7 @@ function prepareMapPayload(url: string, options?: MapOptions): Record<string, un
|
|
|
11
11
|
if (options.includeSubdomains != null) payload.includeSubdomains = options.includeSubdomains;
|
|
12
12
|
if (options.limit != null) payload.limit = options.limit;
|
|
13
13
|
if (options.timeout != null) payload.timeout = options.timeout;
|
|
14
|
+
if (options.location != null) payload.location = options.location;
|
|
14
15
|
}
|
|
15
16
|
return payload;
|
|
16
17
|
}
|