@mendable/firecrawl-js 0.0.11 → 0.0.13
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/build/index.js +1 -1
- package/package.json +3 -1
- package/src/index.ts +2 -2
- package/types/index.d.ts +2 -2
package/build/index.js
CHANGED
|
@@ -67,7 +67,7 @@ export default class FirecrawlApp {
|
|
|
67
67
|
* @param {Params | null} params - Additional parameters for the crawl request.
|
|
68
68
|
* @param {boolean} waitUntilDone - Whether to wait for the crawl job to complete.
|
|
69
69
|
* @param {number} timeout - Timeout in seconds for job status checks.
|
|
70
|
-
* @returns {Promise<CrawlResponse>} The response from the crawl operation.
|
|
70
|
+
* @returns {Promise<CrawlResponse | any>} The response from the crawl operation.
|
|
71
71
|
*/
|
|
72
72
|
crawlUrl(url_1) {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (url, params = null, waitUntilDone = true, timeout = 2) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mendable/firecrawl-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "JavaScript SDK for Firecrawl API",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"publish":"npm run build && npm publish --access public",
|
|
9
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
12
|
},
|
|
11
13
|
"repository": {
|
package/src/index.ts
CHANGED
|
@@ -102,9 +102,9 @@ export default class FirecrawlApp {
|
|
|
102
102
|
* @param {Params | null} params - Additional parameters for the crawl request.
|
|
103
103
|
* @param {boolean} waitUntilDone - Whether to wait for the crawl job to complete.
|
|
104
104
|
* @param {number} timeout - Timeout in seconds for job status checks.
|
|
105
|
-
* @returns {Promise<CrawlResponse>} The response from the crawl operation.
|
|
105
|
+
* @returns {Promise<CrawlResponse | any>} The response from the crawl operation.
|
|
106
106
|
*/
|
|
107
|
-
async crawlUrl(url: string, params: Params | null = null, waitUntilDone: boolean = true, timeout: number = 2): Promise<CrawlResponse> {
|
|
107
|
+
async crawlUrl(url: string, params: Params | null = null, waitUntilDone: boolean = true, timeout: number = 2): Promise<CrawlResponse | any> {
|
|
108
108
|
const headers = this.prepareHeaders();
|
|
109
109
|
let jsonData: Params = { url };
|
|
110
110
|
if (params) {
|
package/types/index.d.ts
CHANGED
|
@@ -61,9 +61,9 @@ export default class FirecrawlApp {
|
|
|
61
61
|
* @param {Params | null} params - Additional parameters for the crawl request.
|
|
62
62
|
* @param {boolean} waitUntilDone - Whether to wait for the crawl job to complete.
|
|
63
63
|
* @param {number} timeout - Timeout in seconds for job status checks.
|
|
64
|
-
* @returns {Promise<CrawlResponse>} The response from the crawl operation.
|
|
64
|
+
* @returns {Promise<CrawlResponse | any>} The response from the crawl operation.
|
|
65
65
|
*/
|
|
66
|
-
crawlUrl(url: string, params?: Params | null, waitUntilDone?: boolean, timeout?: number): Promise<CrawlResponse>;
|
|
66
|
+
crawlUrl(url: string, params?: Params | null, waitUntilDone?: boolean, timeout?: number): Promise<CrawlResponse | any>;
|
|
67
67
|
/**
|
|
68
68
|
* Checks the status of a crawl job using the Firecrawl API.
|
|
69
69
|
* @param {string} jobId - The job ID of the crawl operation.
|