Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Nick:
Nicolas968a2dc75330
diff --git a/apps/api/package.json b/apps/api/package.jsonindex 153ac8413..15e973774 100644--- a/apps/api/package.json+++ b/apps/api/package.json@@ -26,6 +26,7 @@"license": "ISC","devDependencies": {"@flydotio/dockerfile": "^0.4.10",+ "@jest/globals": "^29.7.0","@tsconfig/recommended": "^1.0.3","@types/body-parser": "^1.19.2","@types/bull": "^4.10.0",diff --git a/apps/api/pnpm-lock.yaml b/apps/api/pnpm-lock.yamlindex 9c8dbbc93..ec83e18b7 100644--- a/apps/api/pnpm-lock.yaml+++ b/apps/api/pnpm-lock.yaml@@ -192,6 +192,9 @@ importers:'@flydotio/dockerfile':specifier: ^0.4.10version: 0.4.11+ '@jest/globals':+ specifier: ^29.7.0+ version: 29.7.0'@tsconfig/recommended':specifier: ^1.0.3version: 1.0.6diff --git a/apps/api/src/scraper/WebScraper/__tests__/dns.test.ts b/apps/api/src/scraper/WebScraper/__tests__/dns.test.tsnew file mode 100644index 000000000..968ed1210--- /dev/null+++ b/apps/api/src/scraper/WebScraper/__tests__/dns.test.ts@@ -0,0 +1,15 @@+import CacheableLookup from 'cacheable-lookup';+import https from 'node:https';+import axios from "axios";++describe("DNS", () => {+ it("cached dns", async () => {+ const cachedDns = new CacheableLookup();+ cachedDns.install(https.globalAgent);+ jest.spyOn(cachedDns, "lookupAsync");++ const res = await axios.get("https://example.com");+ expect(res.status).toBe(200);+ expect(cachedDns.lookupAsync).toHaveBeenCalled();+ });+});