Skip to content

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

Merge branch 'main' into fix-attw

Gergő Móricz51da03840545
diff --cc apps/js-sdk/firecrawl/package-lock.json
index ee1baba3a,7c2ecbfd9..83745a5bf
--- a/apps/js-sdk/firecrawl/package-lock.json
+++ b/apps/js-sdk/firecrawl/package-lock.json
@@@ -25,10 -23,11 +23,12 @@@
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.12",
"@types/uuid": "^9.0.8",
+ "dotenv": "^16.4.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.2",
+ "tsup": "^8.2.4",
- "typescript": "^5.4.5"
+ "typescript": "^5.4.5",
+ "uuid": "^9.0.1"
}
},
"node_modules/@ampproject/remapping": {
diff --cc apps/js-sdk/firecrawl/package.json
index f717365e2,c57d8f59e..f5de31597
--- a/apps/js-sdk/firecrawl/package.json
+++ b/apps/js-sdk/firecrawl/package.json
@@@ -1,19 -1,22 +1,19 @@@
{
"name": "@mendable/firecrawl-js",
- "version": "1.2.1",
+ "version": "1.2.3",
"description": "JavaScript SDK for Firecrawl API",
- "main": "build/cjs/index.js",
- "types": "types/index.d.ts",
- "type": "module",
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
"exports": {
- "require": {
- "types": "./types/index.d.ts",
- "default": "./build/cjs/index.js"
- },
- "import": {
- "types": "./types/index.d.ts",
- "default": "./build/esm/index.js"
+ "./package.json": "./package.json",
+ ".": {
+ "import": "./dist/index.js",
+ "default": "./dist/index.cjs"
}
},
+ "type": "module",
"scripts": {
- "build": "tsc --module commonjs --moduleResolution node10 --outDir build/cjs/ && echo '{\"type\": \"commonjs\"}' > build/cjs/package.json && npx tsc --module NodeNext --moduleResolution NodeNext --outDir build/esm/ && echo '{\"type\": \"module\"}' > build/esm/package.json",
+ "build": "tsup",
"build-and-publish": "npm run build && npm publish --access public",
"publish-beta": "npm run build && npm publish --access public --tag beta",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --verbose src/__tests__/v1/**/*.test.ts"
diff --cc apps/js-sdk/firecrawl/src/index.ts
index e9411527b,6da13c53a..6c61c6286
--- a/apps/js-sdk/firecrawl/src/index.ts
+++ b/apps/js-sdk/firecrawl/src/index.ts
@@@ -1,5 -1,5 +1,5 @@@
-import axios, { AxiosResponse, AxiosRequestHeaders } from "axios";
+import axios, { type AxiosResponse, type AxiosRequestHeaders } from "axios";
- import { z } from "zod";
+ import type { ZodSchema } from "zod";
import { zodToJsonSchema } from "zod-to-json-schema";
import { WebSocket } from "isows";
import { TypedEventTarget } from "typescript-event-target";