Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

(js-sdk): Fix types (#2416)

Abimael Martell54984e6416af
diff --git a/.github/workflows/test-js-sdk.yml b/.github/workflows/test-js-sdk.yml
index 730df08f4..6f2208703 100644
--- a/.github/workflows/test-js-sdk.yml
+++ b/.github/workflows/test-js-sdk.yml
@@ -25,6 +25,9 @@ jobs:
- name: Install dependencies
run: npm install
working-directory: ./apps/js-sdk/firecrawl
+ - name: Build
+ run: npm run build
+ working-directory: ./apps/js-sdk/firecrawl
- name: Run tests
run: npm run test
working-directory: ./apps/js-sdk/firecrawl
diff --git a/apps/js-sdk/firecrawl/src/v2/watcher.ts b/apps/js-sdk/firecrawl/src/v2/watcher.ts
index f01e87a9b..1d64798a0 100644
--- a/apps/js-sdk/firecrawl/src/v2/watcher.ts
+++ b/apps/js-sdk/firecrawl/src/v2/watcher.ts
@@ -114,6 +114,7 @@ export class Watcher extends EventEmitter {
const data = (payload.data || []) as Document[];
const snap: Snapshot = this.kind === "crawl"
? {
+ id: this.jobId,
status,
completed: payload.completed ?? 0,
total: payload.total ?? 0,
@@ -123,6 +124,7 @@ export class Watcher extends EventEmitter {
data,
}
: {
+ id: this.jobId,
status,
completed: payload.completed ?? 0,
total: payload.total ?? 0,