@mendable/firecrawl-js 0.0.29-beta.1 → 0.0.29-beta.3

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.
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const index_1 = __importDefault(require("../../index"));
7
+ const uuid_1 = require("uuid");
8
+ const dotenv_1 = __importDefault(require("dotenv"));
9
+ dotenv_1.default.config();
10
+ const TEST_API_KEY = process.env.TEST_API_KEY;
11
+ const API_URL = "http://127.0.0.1:3002";
12
+ describe('FirecrawlApp E2E Tests', () => {
13
+ test.concurrent('should throw error for no API key', () => {
14
+ expect(() => {
15
+ new index_1.default({ apiKey: null, apiUrl: API_URL });
16
+ }).toThrow("No API key provided");
17
+ });
18
+ test.concurrent('should throw error for invalid API key on scrape', async () => {
19
+ const invalidApp = new index_1.default({ apiKey: "invalid_api_key", apiUrl: API_URL });
20
+ await expect(invalidApp.scrapeUrl('https://roastmywebsite.ai')).rejects.toThrow("Request failed with status code 401");
21
+ });
22
+ test.concurrent('should throw error for blocklisted URL on scrape', async () => {
23
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
24
+ const blocklistedUrl = "https://facebook.com/fake-test";
25
+ await expect(app.scrapeUrl(blocklistedUrl)).rejects.toThrow("Request failed with status code 403");
26
+ });
27
+ test.concurrent('should return successful response with valid preview token', async () => {
28
+ const app = new index_1.default({ apiKey: "this_is_just_a_preview_token", apiUrl: API_URL });
29
+ const response = await app.scrapeUrl('https://roastmywebsite.ai');
30
+ expect(response).not.toBeNull();
31
+ expect(response.data?.content).toContain("_Roast_");
32
+ }, 30000); // 30 seconds timeout
33
+ test.concurrent('should return successful response for valid scrape', async () => {
34
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
35
+ const response = await app.scrapeUrl('https://roastmywebsite.ai');
36
+ expect(response).not.toBeNull();
37
+ expect(response.data?.content).toContain("_Roast_");
38
+ expect(response.data).toHaveProperty('markdown');
39
+ expect(response.data).toHaveProperty('metadata');
40
+ expect(response.data).not.toHaveProperty('html');
41
+ }, 30000); // 30 seconds timeout
42
+ test.concurrent('should return successful response with valid API key and include HTML', async () => {
43
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
44
+ const response = await app.scrapeUrl('https://roastmywebsite.ai', { pageOptions: { includeHtml: true } });
45
+ expect(response).not.toBeNull();
46
+ expect(response.data?.content).toContain("_Roast_");
47
+ expect(response.data?.markdown).toContain("_Roast_");
48
+ expect(response.data?.html).toContain("<h1");
49
+ }, 30000); // 30 seconds timeout
50
+ test.concurrent('should return successful response for valid scrape with PDF file', async () => {
51
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
52
+ const response = await app.scrapeUrl('https://arxiv.org/pdf/astro-ph/9301001.pdf');
53
+ expect(response).not.toBeNull();
54
+ expect(response.data?.content).toContain('We present spectrophotometric observations of the Broad Line Radio Galaxy');
55
+ }, 30000); // 30 seconds timeout
56
+ test.concurrent('should return successful response for valid scrape with PDF file without explicit extension', async () => {
57
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
58
+ const response = await app.scrapeUrl('https://arxiv.org/pdf/astro-ph/9301001');
59
+ expect(response).not.toBeNull();
60
+ expect(response.data?.content).toContain('We present spectrophotometric observations of the Broad Line Radio Galaxy');
61
+ }, 30000); // 30 seconds timeout
62
+ test.concurrent('should throw error for invalid API key on crawl', async () => {
63
+ const invalidApp = new index_1.default({ apiKey: "invalid_api_key", apiUrl: API_URL });
64
+ await expect(invalidApp.crawlUrl('https://roastmywebsite.ai')).rejects.toThrow("Request failed with status code 401");
65
+ });
66
+ test.concurrent('should throw error for blocklisted URL on crawl', async () => {
67
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
68
+ const blocklistedUrl = "https://twitter.com/fake-test";
69
+ await expect(app.crawlUrl(blocklistedUrl)).rejects.toThrow("Request failed with status code 403");
70
+ });
71
+ test.concurrent('should return successful response for crawl and wait for completion', async () => {
72
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
73
+ const response = await app.crawlUrl('https://roastmywebsite.ai', { crawlerOptions: { excludes: ['blog/*'] } }, true, 30);
74
+ expect(response).not.toBeNull();
75
+ expect(response[0].content).toContain("_Roast_");
76
+ }, 60000); // 60 seconds timeout
77
+ test.concurrent('should handle idempotency key for crawl', async () => {
78
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
79
+ const uniqueIdempotencyKey = (0, uuid_1.v4)();
80
+ const response = await app.crawlUrl('https://roastmywebsite.ai', { crawlerOptions: { excludes: ['blog/*'] } }, false, 2, uniqueIdempotencyKey);
81
+ expect(response).not.toBeNull();
82
+ expect(response.jobId).toBeDefined();
83
+ await expect(app.crawlUrl('https://roastmywebsite.ai', { crawlerOptions: { excludes: ['blog/*'] } }, true, 2, uniqueIdempotencyKey)).rejects.toThrow("Request failed with status code 409");
84
+ });
85
+ test.concurrent('should check crawl status', async () => {
86
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
87
+ const response = await app.crawlUrl('https://roastmywebsite.ai', { crawlerOptions: { excludes: ['blog/*'] } }, false);
88
+ expect(response).not.toBeNull();
89
+ expect(response.jobId).toBeDefined();
90
+ let statusResponse = await app.checkCrawlStatus(response.jobId);
91
+ const maxChecks = 15;
92
+ let checks = 0;
93
+ while (statusResponse.status === 'active' && checks < maxChecks) {
94
+ await new Promise(resolve => setTimeout(resolve, 1000));
95
+ expect(statusResponse.partial_data).not.toBeNull();
96
+ statusResponse = await app.checkCrawlStatus(response.jobId);
97
+ checks++;
98
+ }
99
+ expect(statusResponse).not.toBeNull();
100
+ expect(statusResponse.status).toBe('completed');
101
+ expect(statusResponse?.data?.length).toBeGreaterThan(0);
102
+ }, 35000); // 35 seconds timeout
103
+ test.concurrent('should return successful response for search', async () => {
104
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
105
+ const response = await app.search("test query");
106
+ expect(response).not.toBeNull();
107
+ expect(response?.data?.[0]?.content).toBeDefined();
108
+ expect(response?.data?.length).toBeGreaterThan(2);
109
+ }, 30000); // 30 seconds timeout
110
+ test.concurrent('should throw error for invalid API key on search', async () => {
111
+ const invalidApp = new index_1.default({ apiKey: "invalid_api_key", apiUrl: API_URL });
112
+ await expect(invalidApp.search("test query")).rejects.toThrow("Request failed with status code 401");
113
+ });
114
+ test.concurrent('should perform LLM extraction', async () => {
115
+ const app = new index_1.default({ apiKey: TEST_API_KEY, apiUrl: API_URL });
116
+ const response = await app.scrapeUrl("https://mendable.ai", {
117
+ extractorOptions: {
118
+ mode: 'llm-extraction',
119
+ extractionPrompt: "Based on the information on the page, find what the company's mission is and whether it supports SSO, and whether it is open source",
120
+ extractionSchema: {
121
+ type: 'object',
122
+ properties: {
123
+ company_mission: { type: 'string' },
124
+ supports_sso: { type: 'boolean' },
125
+ is_open_source: { type: 'boolean' }
126
+ },
127
+ required: ['company_mission', 'supports_sso', 'is_open_source']
128
+ }
129
+ }
130
+ });
131
+ expect(response).not.toBeNull();
132
+ expect(response.data?.llm_extraction).toBeDefined();
133
+ const llmExtraction = response.data?.llm_extraction;
134
+ expect(llmExtraction?.company_mission).toBeDefined();
135
+ expect(typeof llmExtraction?.supports_sso).toBe('boolean');
136
+ expect(typeof llmExtraction?.is_open_source).toBe('boolean');
137
+ }, 30000); // 30 seconds timeout
138
+ });
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const globals_1 = require("@jest/globals");
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const index_1 = __importDefault(require("../index"));
9
+ const promises_1 = require("fs/promises");
10
+ const path_1 = require("path");
11
+ // Mock jest and set the type
12
+ globals_1.jest.mock('axios');
13
+ const mockedAxios = axios_1.default;
14
+ // Get the fixure data from the JSON file in ./fixtures
15
+ async function loadFixture(name) {
16
+ return await (0, promises_1.readFile)((0, path_1.join)(__dirname, 'fixtures', `${name}.json`), 'utf-8');
17
+ }
18
+ (0, globals_1.describe)('the firecrawl JS SDK', () => {
19
+ (0, globals_1.test)('Should require an API key to instantiate FirecrawlApp', async () => {
20
+ const fn = () => {
21
+ new index_1.default({ apiKey: undefined });
22
+ };
23
+ (0, globals_1.expect)(fn).toThrow('No API key provided');
24
+ });
25
+ (0, globals_1.test)('Should return scraped data from a /scrape API call', async () => {
26
+ const mockData = await loadFixture('scrape');
27
+ mockedAxios.post.mockResolvedValue({
28
+ status: 200,
29
+ data: JSON.parse(mockData),
30
+ });
31
+ const apiKey = 'YOUR_API_KEY';
32
+ const app = new index_1.default({ apiKey });
33
+ // Scrape a single URL
34
+ const url = 'https://mendable.ai';
35
+ const scrapedData = await app.scrapeUrl(url);
36
+ (0, globals_1.expect)(mockedAxios.post).toHaveBeenCalledTimes(1);
37
+ (0, globals_1.expect)(mockedAxios.post).toHaveBeenCalledWith(globals_1.expect.stringMatching(/^https:\/\/api.firecrawl.dev/), globals_1.expect.objectContaining({ url }), globals_1.expect.objectContaining({ headers: globals_1.expect.objectContaining({ 'Authorization': `Bearer ${apiKey}` }) }));
38
+ (0, globals_1.expect)(scrapedData.success).toBe(true);
39
+ (0, globals_1.expect)(scrapedData?.data?.metadata.title).toEqual('Mendable');
40
+ });
41
+ });
package/build/index.js CHANGED
@@ -1,10 +1,15 @@
1
- import axios from "axios";
2
- import { z } from "zod";
3
- import { zodToJsonSchema } from "zod-to-json-schema";
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const axios_1 = __importDefault(require("axios"));
7
+ const zod_1 = require("zod");
8
+ const zod_to_json_schema_1 = require("zod-to-json-schema");
4
9
  /**
5
10
  * Main class for interacting with the Firecrawl API.
6
11
  */
7
- export default class FirecrawlApp {
12
+ class FirecrawlApp {
8
13
  /**
9
14
  * Initializes a new instance of the FirecrawlApp class.
10
15
  * @param {FirecrawlAppConfig} config - Configuration options for the FirecrawlApp instance.
@@ -31,8 +36,8 @@ export default class FirecrawlApp {
31
36
  if (params?.extractorOptions?.extractionSchema) {
32
37
  let schema = params.extractorOptions.extractionSchema;
33
38
  // Check if schema is an instance of ZodSchema to correctly identify Zod schemas
34
- if (schema instanceof z.ZodSchema) {
35
- schema = zodToJsonSchema(schema);
39
+ if (schema instanceof zod_1.z.ZodSchema) {
40
+ schema = (0, zod_to_json_schema_1.zodToJsonSchema)(schema);
36
41
  }
37
42
  jsonData = {
38
43
  ...jsonData,
@@ -44,7 +49,7 @@ export default class FirecrawlApp {
44
49
  };
45
50
  }
46
51
  try {
47
- const response = await axios.post(this.apiUrl + "/v0/scrape", jsonData, { headers });
52
+ const response = await axios_1.default.post(this.apiUrl + "/v0/scrape", jsonData, { headers });
48
53
  if (response.status === 200) {
49
54
  const responseData = response.data;
50
55
  if (responseData.success) {
@@ -79,7 +84,7 @@ export default class FirecrawlApp {
79
84
  jsonData = { ...jsonData, ...params };
80
85
  }
81
86
  try {
82
- const response = await axios.post(this.apiUrl + "/v0/search", jsonData, { headers });
87
+ const response = await axios_1.default.post(this.apiUrl + "/v0/search", jsonData, { headers });
83
88
  if (response.status === 200) {
84
89
  const responseData = response.data;
85
90
  if (responseData.success) {
@@ -185,7 +190,7 @@ export default class FirecrawlApp {
185
190
  * @returns {Promise<AxiosResponse>} The response from the POST request.
186
191
  */
187
192
  postRequest(url, data, headers) {
188
- return axios.post(url, data, { headers });
193
+ return axios_1.default.post(url, data, { headers });
189
194
  }
190
195
  /**
191
196
  * Sends a GET request to the specified URL.
@@ -194,7 +199,7 @@ export default class FirecrawlApp {
194
199
  * @returns {Promise<AxiosResponse>} The response from the GET request.
195
200
  */
196
201
  getRequest(url, headers) {
197
- return axios.get(url, { headers });
202
+ return axios_1.default.get(url, { headers });
198
203
  }
199
204
  /**
200
205
  * Monitors the status of a crawl job until completion or failure.
@@ -246,3 +251,4 @@ export default class FirecrawlApp {
246
251
  }
247
252
  }
248
253
  }
254
+ exports.default = FirecrawlApp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mendable/firecrawl-js",
3
- "version": "0.0.29-beta.1",
3
+ "version": "0.0.29-beta.3",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "build/index.js",
6
6
  "types": "types/index.d.ts",
@@ -8,6 +8,7 @@
8
8
  "scripts": {
9
9
  "build": "tsc",
10
10
  "build-and-publish": "npm run build && npm publish --access public",
11
+ "build-cjs": "tsc --project tsconfig.cjs.json",
11
12
  "publish-beta": "npm run build && npm publish --access public --tag beta",
12
13
  "test": "jest src/__tests__/**/*.test.ts"
13
14
  },
@@ -18,6 +19,7 @@
18
19
  "author": "Mendable.ai",
19
20
  "license": "MIT",
20
21
  "dependencies": {
22
+ "@tsconfig/recommended": "^1.0.6",
21
23
  "axios": "^1.6.8",
22
24
  "dotenv": "^16.4.5",
23
25
  "uuid": "^9.0.1",
@@ -38,7 +40,7 @@
38
40
  "@types/uuid": "^9.0.8",
39
41
  "jest": "^29.7.0",
40
42
  "ts-jest": "^29.1.2",
41
- "typescript": "^5.4.5"
43
+ "typescript": "~5.1.6"
42
44
  },
43
45
  "keywords": [
44
46
  "firecrawl",
@@ -1,4 +1,4 @@
1
- import FirecrawlApp from '../../index';
1
+ import FirecrawlApp from '../../index.js';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
3
  import dotenv from 'dotenv';
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { describe, test, expect, jest } from '@jest/globals';
2
2
  import axios from 'axios';
3
- import FirecrawlApp from '../index';
3
+ import FirecrawlApp from '../index.js';
4
4
 
5
5
  import { readFile } from 'fs/promises';
6
6
  import { join } from 'path';
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "declaration": false
6
+ },
7
+ "exclude": [
8
+ "node_modules",
9
+ "dist",
10
+ "docs",
11
+ "**/tests",
12
+ "build"
13
+ ]
14
+ }
package/tsconfig.json CHANGED
@@ -1,117 +1,33 @@
1
1
  {
2
+ "extends": "@tsconfig/recommended",
2
3
  "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
15
- // "jsx": "preserve", /* Specify what JSX code is generated. */
16
- // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
17
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
18
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
19
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
20
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
21
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
22
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
23
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
24
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
25
-
26
- /* Modules */
27
- "rootDir": "./src", /* Specify the root folder within your source files. */
28
-
4
+ "outDir": "../dist",
5
+ "rootDir": "./src",
29
6
  "target": "ES2021",
30
7
  "lib": [
31
8
  "ES2021",
32
9
  "ES2022.Object",
33
10
  "DOM"
34
11
  ],
35
- "module": "NodeNext",
36
- "moduleResolution": "nodenext",/* Specify how TypeScript looks up a file from a given module specifier. */
37
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
38
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
39
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
40
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
41
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
42
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
43
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
44
- // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
45
- // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
46
- // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
47
- // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
48
- // "resolveJsonModule": true, /* Enable importing .json files. */
49
- // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
50
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
51
-
52
- /* JavaScript Support */
53
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
54
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
55
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
56
-
57
- /* Emit */
58
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
59
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
60
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
61
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
62
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
63
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
64
- "outDir": "./build", /* Specify an output folder for all emitted files. */
65
- // "removeComments": true, /* Disable emitting comments. */
66
- // "noEmit": true, /* Disable emitting files from a compilation. */
67
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
68
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
69
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
70
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
71
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
72
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
73
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
74
- // "newLine": "crlf", /* Set the newline character for emitting files. */
75
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
76
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
77
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
78
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
79
- "declarationDir": "./types", /* Specify the output directory for generated declaration files. */
80
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
81
-
82
- /* Interop Constraints */
83
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
84
- // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
85
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
86
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
87
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
88
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
89
-
90
- /* Type Checking */
91
- "strict": true, /* Enable all strict type-checking options. */
92
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
93
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
94
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
95
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
96
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
97
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
98
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
99
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
100
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
101
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
102
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
103
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
104
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
105
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
106
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
107
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
108
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
109
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
110
-
111
- /* Completeness */
112
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
113
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
12
+ "module": "ES2020",
13
+ "moduleResolution": "nodenext",
14
+ "esModuleInterop": false,
15
+ "declaration": true,
16
+ "noImplicitReturns": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "useDefineForClassFields": true,
21
+ "strictPropertyInitialization": false,
22
+ "allowJs": true,
23
+ "strict": false
114
24
  },
115
- "include": ["src/**/*"],
116
- "exclude": ["node_modules", "dist", "**/__tests__/*"]
117
- }
25
+ "include": [
26
+ "src/**/*"
27
+ ],
28
+ "exclude": [
29
+ "node_modules",
30
+ "dist",
31
+ "docs"
32
+ ]
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};