@mendable/firecrawl 4.11.3 → 4.11.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.
@@ -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.3",
11
+ version: "4.11.5",
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.11.3",
38
+ version: "4.11.5",
39
39
  description: "JavaScript SDK for Firecrawl API",
40
40
  main: "dist/index.js",
41
41
  types: "dist/index.d.ts",
@@ -117,6 +117,7 @@ __export(index_exports, {
117
117
  FirecrawlClient: () => FirecrawlClient,
118
118
  JobTimeoutError: () => JobTimeoutError,
119
119
  SdkError: () => SdkError,
120
+ Watcher: () => Watcher,
120
121
  default: () => index_default
121
122
  });
122
123
  module.exports = __toCommonJS(index_exports);
@@ -2871,5 +2872,6 @@ var index_default = Firecrawl;
2871
2872
  FirecrawlAppV1,
2872
2873
  FirecrawlClient,
2873
2874
  JobTimeoutError,
2874
- SdkError
2875
+ SdkError,
2876
+ Watcher
2875
2877
  });
package/dist/index.d.cts CHANGED
@@ -380,7 +380,7 @@ interface CrawlOptions {
380
380
  excludePaths?: string[] | null;
381
381
  includePaths?: string[] | null;
382
382
  maxDiscoveryDepth?: number | null;
383
- sitemap?: 'skip' | 'include';
383
+ sitemap?: 'skip' | 'include' | 'only';
384
384
  ignoreQueryParameters?: boolean;
385
385
  limit?: number | null;
386
386
  crawlEntireDomain?: boolean;
@@ -466,6 +466,7 @@ interface AgentStatusResponse {
466
466
  status: 'processing' | 'completed' | 'failed';
467
467
  error?: string;
468
468
  data?: unknown;
469
+ model?: 'spark-1-pro' | 'spark-1-mini';
469
470
  expiresAt: string;
470
471
  creditsUsed?: number;
471
472
  }
@@ -1735,4 +1736,4 @@ declare class Firecrawl extends FirecrawlClient {
1735
1736
  get v1(): FirecrawlApp;
1736
1737
  }
1737
1738
 
1738
- export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, 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, JobTimeoutError, 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 };
1739
+ export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, 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, JobTimeoutError, 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, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
package/dist/index.d.ts CHANGED
@@ -380,7 +380,7 @@ interface CrawlOptions {
380
380
  excludePaths?: string[] | null;
381
381
  includePaths?: string[] | null;
382
382
  maxDiscoveryDepth?: number | null;
383
- sitemap?: 'skip' | 'include';
383
+ sitemap?: 'skip' | 'include' | 'only';
384
384
  ignoreQueryParameters?: boolean;
385
385
  limit?: number | null;
386
386
  crawlEntireDomain?: boolean;
@@ -466,6 +466,7 @@ interface AgentStatusResponse {
466
466
  status: 'processing' | 'completed' | 'failed';
467
467
  error?: string;
468
468
  data?: unknown;
469
+ model?: 'spark-1-pro' | 'spark-1-mini';
469
470
  expiresAt: string;
470
471
  creditsUsed?: number;
471
472
  }
@@ -1735,4 +1736,4 @@ declare class Firecrawl extends FirecrawlClient {
1735
1736
  get v1(): FirecrawlApp;
1736
1737
  }
1737
1738
 
1738
- export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, 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, JobTimeoutError, 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 };
1739
+ export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, 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, JobTimeoutError, 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, Watcher, type WatcherOptions, 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-TLAC3APA.js";
3
+ } from "./chunk-QMFPXJCS.js";
4
4
 
5
5
  // src/v2/utils/httpClient.ts
6
6
  import axios from "axios";
@@ -1374,7 +1374,7 @@ var FirecrawlApp = class {
1374
1374
  if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
1375
1375
  return process.env.npm_package_version;
1376
1376
  }
1377
- const packageJson = await import("./package-3BZQ6TAW.js");
1377
+ const packageJson = await import("./package-WCQMBCSR.js");
1378
1378
  return packageJson.default.version;
1379
1379
  } catch (error) {
1380
1380
  const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
@@ -2752,5 +2752,6 @@ export {
2752
2752
  FirecrawlClient,
2753
2753
  JobTimeoutError,
2754
2754
  SdkError,
2755
+ Watcher,
2755
2756
  index_default as default
2756
2757
  };
@@ -1,4 +1,4 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-TLAC3APA.js";
3
+ } from "./chunk-QMFPXJCS.js";
4
4
  export default require_package();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mendable/firecrawl",
3
- "version": "4.11.3",
3
+ "version": "4.11.5",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -128,9 +128,9 @@ describe("v2.scrape e2e", () => {
128
128
  });
129
129
  expect(doc.images).toBeTruthy();
130
130
  expect(Array.isArray(doc.images)).toBe(true);
131
- expect(doc.images.length).toBeGreaterThan(0);
131
+ expect(doc.images?.length).toBeGreaterThan(0);
132
132
  // Should find firecrawl logo/branding images
133
- expect(doc.images.some(img => img.includes("firecrawl") || img.includes("logo"))).toBe(true);
133
+ expect(doc.images?.some(img => img.includes("firecrawl") || img.includes("logo"))).toBe(true);
134
134
  }, 60_000);
135
135
 
136
136
  test("images format: works with multiple formats", async () => {
@@ -142,7 +142,7 @@ describe("v2.scrape e2e", () => {
142
142
  expect(doc.links).toBeTruthy();
143
143
  expect(doc.images).toBeTruthy();
144
144
  expect(Array.isArray(doc.images)).toBe(true);
145
- expect(doc.images.length).toBeGreaterThan(0);
145
+ expect(doc.images?.length).toBeGreaterThan(0);
146
146
 
147
147
  // Images should find things not available in links format
148
148
  const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.svg', '.ico'];
@@ -151,7 +151,7 @@ describe("v2.scrape e2e", () => {
151
151
  ) || [];
152
152
 
153
153
  // Should discover additional images beyond those with obvious extensions
154
- expect(doc.images.length).toBeGreaterThanOrEqual(linkImages.length);
154
+ expect(doc.images?.length).toBeGreaterThanOrEqual(linkImages.length);
155
155
  }, 60_000);
156
156
 
157
157
  test("invalid url should throw", async () => {
@@ -2,7 +2,7 @@
2
2
  * E2E tests for v2 search (translated from Python tests)
3
3
  */
4
4
  import Firecrawl from "../../../index";
5
- import type { Document, SearchResult } from "../../../index";
5
+ import type { Document, SearchResultWeb, SearchResultNews, SearchResultImages } from "../../../index";
6
6
  import { config } from "dotenv";
7
7
  import { getIdentity, getApiUrl } from "./utils/idmux";
8
8
  import { describe, test, expect, beforeAll } from "@jest/globals";
@@ -28,7 +28,7 @@ function collectTexts(entries: any[] | undefined): string[] {
28
28
  return texts;
29
29
  }
30
30
 
31
- function isDocument(entry: Document | SearchResult | undefined | null): entry is Document {
31
+ function isDocument(entry: Document | SearchResultWeb | SearchResultNews | SearchResultImages | undefined | null): entry is Document {
32
32
  if (!entry) return false;
33
33
  const d = entry as Document;
34
34
  return (
@@ -86,10 +86,10 @@ describe("v2.search e2e", () => {
86
86
  expect(results.images == null).toBe(true);
87
87
 
88
88
  const webTitles = (results.web || [])
89
- .filter((r): r is SearchResult => !isDocument(r))
89
+ .filter((r): r is SearchResultWeb => !isDocument(r))
90
90
  .map(r => (r.title || "").toString().toLowerCase());
91
91
  const webDescriptions = (results.web || [])
92
- .filter((r): r is SearchResult => !isDocument(r))
92
+ .filter((r): r is SearchResultWeb => !isDocument(r))
93
93
  .map(r => (r.description || "").toString().toLowerCase());
94
94
  const allWebText = (webTitles.concat(webDescriptions)).join(" ");
95
95
  expect(allWebText.includes("firecrawl")).toBe(true);
@@ -183,7 +183,7 @@ describe("v2.search e2e", () => {
183
183
  expect(Boolean(result.markdown) || Boolean(result.html)).toBe(true);
184
184
  } else {
185
185
  expect(typeof result.url).toBe("string");
186
- expect(result.url.startsWith("http")).toBe(true);
186
+ expect(result.url?.startsWith("http")).toBe(true);
187
187
  }
188
188
  }
189
189
  }
@@ -193,7 +193,7 @@ describe("v2.search e2e", () => {
193
193
  for (const result of results.images || []) {
194
194
  if (!isDocument(result)) {
195
195
  expect(typeof result.url).toBe("string");
196
- expect(result.url.startsWith("http")).toBe(true);
196
+ expect(result.url?.startsWith("http")).toBe(true);
197
197
  }
198
198
  }
199
199
  }, 120_000);
package/src/index.ts CHANGED
@@ -9,6 +9,8 @@
9
9
  export { FirecrawlClient } from "./v2/client";
10
10
  /** Public v2 request/response types. */
11
11
  export * from "./v2/types";
12
+ /** Watcher class and options for crawl/batch job monitoring. */
13
+ export { Watcher, type WatcherOptions } from "./v2/watcher";
12
14
  /** Legacy v1 client (feature‑frozen). */
13
15
  export { default as FirecrawlAppV1 } from "./v1";
14
16
 
package/src/v2/types.ts CHANGED
@@ -460,7 +460,7 @@ export interface CrawlOptions {
460
460
  excludePaths?: string[] | null;
461
461
  includePaths?: string[] | null;
462
462
  maxDiscoveryDepth?: number | null;
463
- sitemap?: 'skip' | 'include';
463
+ sitemap?: 'skip' | 'include' | 'only';
464
464
  ignoreQueryParameters?: boolean;
465
465
  limit?: number | null;
466
466
  crawlEntireDomain?: boolean;
@@ -556,6 +556,7 @@ export interface AgentStatusResponse {
556
556
  status: 'processing' | 'completed' | 'failed';
557
557
  error?: string;
558
558
  data?: unknown;
559
+ model?: 'spark-1-pro' | 'spark-1-mini';
559
560
  expiresAt: string;
560
561
  creditsUsed?: number;
561
562
  }